Re: Hi all
[notmuch-archives.git] / 52 / 94c19b3f66a89104046fb4c08deabe92f40cc0
1 Return-Path: <patricktotzke@gmail.com>\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 9FFE9431FC7\r
6         for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 03:44:59 -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: 1.7\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.7 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id OMbdXNDY-8Dv for <notmuch@notmuchmail.org>;\r
18         Tue, 25 Sep 2012 03:44:59 -0700 (PDT)\r
19 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com\r
20         [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id EB332431FAF\r
23         for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 03:44:58 -0700 (PDT)\r
24 Received: by wiwc10 with SMTP id c10so2239431wiw.2\r
25         for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 03:44:56 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=content-type:mime-version:content-transfer-encoding:from:user-agent\r
28         :to:references:in-reply-to:message-id:subject:date;\r
29         bh=NbanrR4/4wWjPyTlmDO0dCxKwECl6V7xboOuSt5PR9o=;\r
30         b=d/T1WzCM8yItroLEm4U13yNakdZOGhtkgb5ccolZsY453v4HsSnBfze+dbLfNcgt5n\r
31         UUIQySU2ekf6hc12CEqg2IrAgnDCsiaMe3j/GrKBU708Y5u+6CExlo64xTi4YiOhW5uY\r
32         GYsKrvfnlqMG9RvBEoV6vTKJOlbIui+PULNvNv2gLiIo9NqqPuoKeJqiP/PVLFKBxSUf\r
33         pGSEGidMd3NDG9U9dKQCahPg2GcSaa0VTzKI+eE0ogZybKQWGH3BYtY8cnrxNgISt98a\r
34         0N3wGw2F6tokDv7vvsV+9eig7b3AX3bXH23OWvt3M0utnBypxTKfiaN3rIAkUhxVtrVf\r
35         dpoA==\r
36 Received: by 10.216.202.133 with SMTP id d5mr4743023weo.63.1348569896301;\r
37         Tue, 25 Sep 2012 03:44:56 -0700 (PDT)\r
38 Received: from localhost (dhcp-91-036.inf.ed.ac.uk. [129.215.91.36])\r
39         by mx.google.com with ESMTPS id do5sm22237246wib.10.2012.09.25.03.44.55\r
40         (version=TLSv1/SSLv3 cipher=OTHER);\r
41         Tue, 25 Sep 2012 03:44:55 -0700 (PDT)\r
42 Content-Type: text/plain; charset="utf-8"\r
43 MIME-Version: 1.0\r
44 Content-Transfer-Encoding: quoted-printable\r
45 From: Patrick Totzke <patricktotzke@gmail.com>\r
46 User-Agent: alot/0.3.3+\r
47 To: Suvayu Ali <fatkasuvayu+linux@gmail.com>,  notmuch@notmuchmail.org\r
48 References: <20120924082646.GA10577@kuru.dyndns-at-home.com>\r
49 In-Reply-To: <20120924082646.GA10577@kuru.dyndns-at-home.com>\r
50 Message-ID: <20120925104457.12264.30350@megatron>\r
51 Subject: Re: nbook: a notmuch based address book written in python\r
52 Date: Tue, 25 Sep 2012 11:44:57 +0100\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Tue, 25 Sep 2012 10:44:59 -0000\r
66 \r
67 Hey Suvayu, welcome to notmuch!\r
68 \r
69 I hope you are aware that there are already a few search based abook tools\r
70 around for notmuch (listed in the wiki, albeit hidden in the emacs docs):\r
71 http://notmuchmail.org/emacstips/#index14h2\r
72 I personally use nottoomuch-addresses.sh, which apparently does some advanc=\r
73 ed\r
74 caching voodoo for speed.\r
75 \r
76 But to your tool; practice test:\r
77 I wasn't able to use wildcards or simply prefixes of names. This is essenti=\r
78 al\r
79 if you want to use it for tabcompleting contacts in a MUA.\r
80 The time lookups take seems to depend on how many matches there are:\r
81 \r
82 -------------------------------\r
83 time nbook Suvayu\r
84 1 unique email addresses found for `Suvayu'\r
85 fatkasuvayu+linux@gmail.com     Suvayu Ali\r
86 \r
87 nbook Suvayu  0.04s user 0.01s system 95% cpu 0.050 total\r
88 -------------------------------\r
89 time nbook Justus\r
90 ...\r
91 \r
92 nbook Justus  0.21s user 0.07s system 11% cpu 2.484 total\r
93 -------------------------------\r
94 And If I look for my own name, this takes over a minute,\r
95 eventually dying. This could be an issue with libnotmuch though.\r
96 Possibly, your algorithm takes very long and then reads from an initially\r
97 opened Database object again, which was invalidated by concurrent writes of=\r
98  other processes..\r
99 \r
100 -------------------------------\r
101 [~] time nbook Patrick                     =\r
102 \r
103 \r
104 Error opening /home/pazz/mail/gmail/[Google Mail].All Mail/cur/1330682270_0=\r
105 .12958.megatron,U=3D8766,FMD5=3D66ff6a8bc18a8a3ac4b311daa93d358a:2,S: Too m=\r
106 any open files\r
107 Traceback (most recent call last):\r
108   File "/home/pazz/bin/nbook", line 167, in <module>\r
109   File "/home/pazz/bin/nbook", line 71, in __init__\r
110   File "/home/pazz/.local/lib/python2.7/site-packages/notmuch/message.py", =\r
111 line 233, in get_header\r
112 notmuch.errors.NullPointerError\r
113 Error in sys.excepthook:\r
114 Traceback (most recent call last):\r
115   File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, i=\r
116 n apport_excepthook\r
117 ImportError: No module named fileutils\r
118 \r
119 Original exception was:\r
120 Traceback (most recent call last):\r
121   File "/home/pazz/bin/nbook", line 167, in <module>\r
122   File "/home/pazz/bin/nbook", line 71, in __init__\r
123   File "/home/pazz/.local/lib/python2.7/site-packages/notmuch/message.py", =\r
124 line 233, in get_header\r
125 notmuch.errors.NullPointerError\r
126 nbook Patrick  3.20s user 5.47s system 12% cpu 1:11.65 total\r
127 ------------------------------------\r
128 \r
129 Anyway, have fun hacking notmuch! If you are looking for a related project =\r
130 to bring in your python skills\r
131 I could think of one or two :D\r
132 Best,\r
133 /p\r