* vala, this is notmuch. notmuch, this is vala
@ 2010-04-05 12:49 Sebastian Spaeth
2010-04-05 13:50 ` Enrico Zini
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Spaeth @ 2010-04-05 12:49 UTC (permalink / raw)
To: Notmuch development list
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vala, this is notmuch. notmuch, this is vala
2010-04-05 12:49 vala, this is notmuch. notmuch, this is vala Sebastian Spaeth
@ 2010-04-05 13:50 ` Enrico Zini
2010-04-05 14:12 ` Adrien Bustany
2010-04-06 8:47 ` Sebastian Spaeth
0 siblings, 2 replies; 5+ messages in thread
From: Enrico Zini @ 2010-04-05 13:50 UTC (permalink / raw)
To: Notmuch development list
[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]
On Mon, Apr 05, 2010 at 02:49:23PM +0200, Sebastian Spaeth wrote:
> 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:
Ooh, a .vapi for notmuch, that is something that makes me happy. It
could be shipped with notmuch proper, even if it's rough now, and then
improved as people use it.
> 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.
Now I use "lbdb", which gets very slow as time goes. You idea creates a
most definitely superior system.
> Just a teaser to make you interested in vala :).
As it happens, some of us already are interested.
As soon as automatic gobject introspection based language bindings
become workable for at least python and perl, my plan is to rewrite
buffy[1] in Vala.
A second plan would be to have buffy show stats for saved notmuch
queries as well as (or instead of) mail folders.
It's very nice to know I wouldn't be the only person playing with Vala
around here.
Ciao,
Enrico
[1] http://packages.debian.org/sid/buffy
--
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <enrico@enricozini.org>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vala, this is notmuch. notmuch, this is vala
2010-04-05 13:50 ` Enrico Zini
@ 2010-04-05 14:12 ` Adrien Bustany
2010-04-05 18:19 ` Carl Worth
2010-04-06 8:47 ` Sebastian Spaeth
1 sibling, 1 reply; 5+ messages in thread
From: Adrien Bustany @ 2010-04-05 14:12 UTC (permalink / raw)
To: Enrico Zini; +Cc: Notmuch development list
On Mon, 5 Apr 2010 14:50:04 +0100, Enrico Zini <enrico@enricozini.org>
wrote:
> On Mon, Apr 05, 2010 at 02:49:23PM +0200, Sebastian Spaeth wrote:
>
>> 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:
>
> Ooh, a .vapi for notmuch, that is something that makes me happy. It
> could be shipped with notmuch proper, even if it's rough now, and then
> improved as people use it.
We actually realized with spaetz that we duplicated work on this one... I
also have a vapi file, which is working pretty well so far (I've used
almost all the functions in it). I guess we should merge them, and include
the result in notmuch's tree.
See
http://git.mymadcat.com/index.php/p/abitmore/source/tree/master/src/notmuch.vapi
>
>
>> 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.
>
> Now I use "lbdb", which gets very slow as time goes. You idea creates a
> most definitely superior system.
>
>
>> Just a teaser to make you interested in vala :).
>
> As it happens, some of us already are interested.
>
> As soon as automatic gobject introspection based language bindings
> become workable for at least python and perl, my plan is to rewrite
> buffy[1] in Vala.
>
> A second plan would be to have buffy show stats for saved notmuch
> queries as well as (or instead of) mail folders.
>
> It's very nice to know I wouldn't be the only person playing with Vala
> around here.
Make them two ;)
Cheers
Adrien
>
>
> Ciao,
>
> Enrico
>
> [1] http://packages.debian.org/sid/buffy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vala, this is notmuch. notmuch, this is vala
2010-04-05 14:12 ` Adrien Bustany
@ 2010-04-05 18:19 ` Carl Worth
0 siblings, 0 replies; 5+ messages in thread
From: Carl Worth @ 2010-04-05 18:19 UTC (permalink / raw)
To: Adrien Bustany, Enrico Zini; +Cc: Notmuch development list
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
On Mon, 05 Apr 2010 16:12:02 +0200, Adrien Bustany <abustany@gnome.org> wrote:
> We actually realized with spaetz that we duplicated work on this one... I
> also have a vapi file, which is working pretty well so far (I've used
> almost all the functions in it). I guess we should merge them, and include
> the result in notmuch's tree.
Very interesting stuff. Yes, please let me know when things are merged
and I'll be glad to carry this in the notmuch repository.
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vala, this is notmuch. notmuch, this is vala
2010-04-05 13:50 ` Enrico Zini
2010-04-05 14:12 ` Adrien Bustany
@ 2010-04-06 8:47 ` Sebastian Spaeth
1 sibling, 0 replies; 5+ messages in thread
From: Sebastian Spaeth @ 2010-04-06 8:47 UTC (permalink / raw)
To: Enrico Zini, Notmuch development list
On Mon, 5 Apr 2010 14:50:04 +0100, Enrico Zini <enrico@enricozini.org> wrote:
> Now I use "lbdb", which gets very slow as time goes. You idea creates a
> most definitely superior system.
You can actually use both :): Do check out the patch on the mailing list
to combine the notmuch address lookup with bbdb via EUDC. It works nice
for me. Although the notmuch address lookup works so well for me that I
basically never get a fallback to bbdb.
If pure email addresses is all you need (no real names yet), the above
code works well when integrated via EUDC.
Sebastian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-06 8:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-05 12:49 vala, this is notmuch. notmuch, this is vala Sebastian Spaeth
2010-04-05 13:50 ` Enrico Zini
2010-04-05 14:12 ` Adrien Bustany
2010-04-05 18:19 ` Carl Worth
2010-04-06 8:47 ` Sebastian Spaeth
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).