Re: priorities for 0.7
[notmuch-archives.git] / 58 / b117255000d288e1f2b36c895e30d3ffd272d3
1 Return-Path: <Sebastian@SSpaeth.de>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 51D3C4196F4\r
6         for <notmuch@notmuchmail.org>; Mon,  5 Apr 2010 05:49:29 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.8\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.8 tagged_above=-999 required=5 tests=[BAYES_50=0.8,\r
12         RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id U5oSj6wmgpIH for <notmuch@notmuchmail.org>;\r
16         Mon,  5 Apr 2010 05:49:28 -0700 (PDT)\r
17 Received: from homiemail-a22.g.dreamhost.com (caiajhbdcaid.dreamhost.com\r
18         [208.97.132.83])\r
19         by olra.theworths.org (Postfix) with ESMTP id 64F524196F0\r
20         for <notmuch@notmuchmail.org>; Mon,  5 Apr 2010 05:49:28 -0700 (PDT)\r
21 Received: from sspaeth.de (unknown [195.190.188.219])\r
22         by homiemail-a22.g.dreamhost.com (Postfix) with ESMTPA id 62F531A8061\r
23         for <notmuch@notmuchmail.org>; Mon,  5 Apr 2010 05:49:26 -0700 (PDT)\r
24 Received: by sspaeth.de (sSMTP sendmail emulation);\r
25         Mon, 05 Apr 2010 14:49:23 +0200\r
26 From: "Sebastian Spaeth" <Sebastian@SSpaeth.de>\r
27 To: Notmuch development list <notmuch@notmuchmail.org>\r
28 Date: Mon, 05 Apr 2010 14:49:23 +0200\r
29 Message-ID: <874ojq5ajw.fsf@SSpaeth.de>\r
30 MIME-Version: 1.0\r
31 Content-Type: text/plain; charset=us-ascii\r
32 Subject: [notmuch] vala, this is notmuch. notmuch, this is vala\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.13\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37         <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
39         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Mon, 05 Apr 2010 12:49:29 -0000\r
46 \r
47 I really want to replace my address book with dynamic notmuch searches\r
48 and while python gives me those in 0.3 seconds or so, I wanted better.\r
49 \r
50 So I bound notmuch.so to vala (at least what I needed) and played with\r
51 the code a bit. The resulting 100 lines of vala code are here:\r
52 \r
53 http://github.com/spaetz/vala-notmuch/tree/master/src\r
54 \r
55 For those without vala, this is the generated C file which can be\r
56 compiled with './make' in the same directory:\r
57 \r
58 http://github.com/spaetz/vala-notmuch/blob/static-sources/src/notmuch.c\r
59 \r
60 Usage: "./vnotmuch Seb" will output all 'to:' addresses according to\r
61 frequency for all messages where to, cc, or bcc matches "Seb*". It also\r
62 filters with AND "from:yourprimarymailaddress". Just\r
63 "./vnotmuch" outputs all addresses that you ever sent mails to. It never\r
64 writes/modifies your db.\r
65 \r
66 The only output you get are the lowercased email addresses and the\r
67 frequency, no names are preserved/output.\r
68 \r
69 It is fast. This is my "./vnotmuch Seb" search over 14.5k mails with\r
70 857 mails from my primary account:\r
71 real    0m0.026s\r
72 user    0m0.000s\r
73 sys     0m0.020s\r
74 \r
75 Just a teaser to make you interested in vala :).\r
76 \r
77 Sebastian\r