[notmuch] vala, this is notmuch. notmuch, this is vala

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Apr 5 05:49:23 PDT 2010


I really want to replace my address book with dynamic notmuch searches
and while python gives me those in 0.3 seconds or so, I wanted better.

So I bound notmuch.so to vala (at least what I needed) and played with
the code a bit. The resulting 100 lines of vala code are here:

http://github.com/spaetz/vala-notmuch/tree/master/src

For those without vala, this is the generated C file which can be
compiled with './make' in the same directory:

http://github.com/spaetz/vala-notmuch/blob/static-sources/src/notmuch.c

Usage: "./vnotmuch Seb" will output all 'to:' addresses according to
frequency for all messages where to, cc, or bcc matches "Seb*". It also
filters with AND "from:yourprimarymailaddress". Just
"./vnotmuch" outputs all addresses that you ever sent mails to. It never
writes/modifies your db.

The only output you get are the lowercased email addresses and the
frequency, no names are preserved/output.

It is fast. This is my "./vnotmuch Seb" search over 14.5k mails with
857 mails from my primary account:
real	0m0.026s
user	0m0.000s
sys	0m0.020s

Just a teaser to make you interested in vala :).

Sebastian


More information about the notmuch mailing list