[notmuch] Thoughts on notmuch and Lua

Ali Polatel alip at exherbo.org
Thu Jan 14 00:47:13 PST 2010


Before trying to implement anything I decided to send a mail to the list
to ask people's opinion.

What's the problem?
===================
Notmuch isn't very configurable.

How can Lua integration solve this?
===================================
Here are initial thoughts on how to integrate Lua with notmuch.
Any comments appreciated.

1. Configuration file:
The configuration file can be a Lua script that allows more dynamic
configuration. Here's an example:

# notmuch configuration file:
config = {}
config.dbpath = "/path/to/maildir"
config.exclude = function (maildir)
    return not string.match(maildir, ".*Trash.*")
    end
...

2. Hooks:
This is a feature I really miss having switched from sup.
There can be many hooks, a hook that formats search output,
a hook that is called before adding messages to the database which may
be used to add initial tags depending on headers etc.

Why Lua?
========
Lua has many advantages over other scripting languages when it comes to
integration with a C program. It has a very clean and easy C API, the
overhead of running Lua scripts is not noticable among other things.

-- 
Regards,
Ali Polatel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100114/67708c7c/attachment-0001.pgp>


More information about the notmuch mailing list