[PATCH] This patch is a little finger excercise for working with git. I found a piece...
[notmuch-archives.git] / 87 / 04b977b3f994d4c2cf24f073be4bb1f3f7b199
1 Return-Path: <fatkasuvayu+linux@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 2224E431FB6\r
6         for <notmuch@notmuchmail.org>; Mon,  8 Oct 2012 02:34:37 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 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, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id kYvVl-VLcJZm for <notmuch@notmuchmail.org>;\r
17         Mon,  8 Oct 2012 02:34:36 -0700 (PDT)\r
18 Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com\r
19  [74.125.83.53])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  4632E431FAF    for <notmuch@notmuchmail.org>; Mon,  8 Oct 2012 02:34:36 -0700\r
22  (PDT)\r
23 Received: by mail-ee0-f53.google.com with SMTP id d17so2924031eek.26\r
24         for <notmuch@notmuchmail.org>; Mon, 08 Oct 2012 02:34:33 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=sender:date:from:to:subject:message-id:mail-followup-to:references\r
27         :mime-version:content-type:content-disposition:in-reply-to\r
28         :user-agent; bh=yKYkBjAlJR0x3VvvuEd+AeBlUo1yQIrRc/jzj+DChjM=;\r
29         b=ZjSdY8rWQWhZb8HjqPyR+18RmD8zsG8LM9O6HRHWk6+KqBHl5uinrDZiqBzrjcO61r\r
30         +e+iQ/8wxX/iRp4xEurGgfEOKIOJ5JASJzWv5jdPMB7ZDPMFerb96kPBobmsoQ8LDGd2\r
31         kCufFyEZtsMCojiOxT7WLmPBS14MGGFNiIxb1Imfx04ocTQJuEtPvM6EOOWQVmq3tnZ9\r
32         P6dNq/UeBs+QUkVa8S7uX8ozB6SbZ+OMtoxMeaAV4XCoEsomeVap4mnqN6w0XqjqNbvK\r
33         SGO+Nn5HSiPnR27KdTR47J3SbhqGbtKJWtrxxd/Jg501oStX7Pr0ANDTVQ/zXb1+xWuL\r
34         8e4Q==\r
35 Received: by 10.14.202.131 with SMTP id d3mr21893463eeo.32.1349688873653;\r
36         Mon, 08 Oct 2012 02:34:33 -0700 (PDT)\r
37 Received: from kuru.dyndns-at-home.com (pb-d-128-141-52-183.cern.ch.\r
38         [128.141.52.183])\r
39         by mx.google.com with ESMTPS id r45sm28828615eem.6.2012.10.08.02.34.32\r
40         (version=TLSv1/SSLv3 cipher=OTHER);\r
41         Mon, 08 Oct 2012 02:34:32 -0700 (PDT)\r
42 Sender: suvayu ali <fatkasuvayu@gmail.com>\r
43 Date: Mon, 8 Oct 2012 11:34:29 +0200\r
44 From: Suvayu Ali <fatkasuvayu+linux@gmail.com>\r
45 To: notmuch@notmuchmail.org\r
46 Subject: Re: nbook: a notmuch based address book written in python\r
47 Message-ID: <20121008093429.GC4534@kuru.dyndns-at-home.com>\r
48 Mail-Followup-To: notmuch@notmuchmail.org\r
49 References: <20120924082646.GA10577@kuru.dyndns-at-home.com>\r
50         <20120925104457.12264.30350@megatron>\r
51 MIME-Version: 1.0\r
52 Content-Type: text/plain; charset=us-ascii\r
53 Content-Disposition: inline\r
54 In-Reply-To: <20120925104457.12264.30350@megatron>\r
55 User-Agent: Mutt/1.5.21 (2011-07-01)\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Mon, 08 Oct 2012 09:34:38 -0000\r
69 \r
70 Hi Patrick,\r
71 \r
72 Sorry for the very late reply; I got distracted with some personal\r
73 matters.\r
74 \r
75 On Tue, Sep 25, 2012 at 11:44:57AM +0100, Patrick Totzke wrote:\r
76 > Hey Suvayu, welcome to notmuch!\r
77\r
78 > I hope you are aware that there are already a few search based abook tools\r
79 > around for notmuch (listed in the wiki, albeit hidden in the emacs docs):\r
80 > http://notmuchmail.org/emacstips/#index14h2\r
81 > I personally use nottoomuch-addresses.sh, which apparently does some advanced\r
82 > caching voodoo for speed.\r
83\r
84 \r
85 I wasn't aware of either of them, thanks for pointing them out.  I'll\r
86 take a look for inspiration and ideas.\r
87 \r
88 > But to your tool; practice test:\r
89 > I wasn't able to use wildcards or simply prefixes of names. This is essential\r
90 > if you want to use it for tabcompleting contacts in a MUA.\r
91 \r
92 Since the idea was inspired by the completion on the Gmail web\r
93 interface, I already do a partial search so wildcards should not be\r
94 necessary.\r
95 \r
96 > The time lookups take seems to depend on how many matches there are:\r
97\r
98 > -------------------------------\r
99 > time nbook Suvayu\r
100 > 1 unique email addresses found for `Suvayu'\r
101 > fatkasuvayu+linux@gmail.com     Suvayu Ali\r
102\r
103 > nbook Suvayu  0.04s user 0.01s system 95% cpu 0.050 total\r
104 > -------------------------------\r
105 > time nbook Justus\r
106 > ...\r
107\r
108 > nbook Justus  0.21s user 0.07s system 11% cpu 2.484 total\r
109 > -------------------------------\r
110 \r
111 Yes, I noticed this too when I searched for the more common names.  Not\r
112 sure how to get around this though.\r
113 \r
114 > And If I look for my own name, this takes over a minute,\r
115 > eventually dying. This could be an issue with libnotmuch though.\r
116 > Possibly, your algorithm takes very long and then reads from an initially\r
117 > opened Database object again, which was invalidated by concurrent writes of other processes..\r
118\r
119 > -------------------------------\r
120 > [~] time nbook Patrick                     \r
121\r
122 > Error opening /home/pazz/mail/gmail/[Google Mail].All Mail/cur/1330682270_0.12958.megatron,U=8766,FMD5=66ff6a8bc18a8a3ac4b311daa93d358a:2,S: Too many open files\r
123 > Traceback (most recent call last):\r
124 >   File "/home/pazz/bin/nbook", line 167, in <module>\r
125 >   File "/home/pazz/bin/nbook", line 71, in __init__\r
126 >   File "/home/pazz/.local/lib/python2.7/site-packages/notmuch/message.py", line 233, in get_header\r
127 > notmuch.errors.NullPointerError\r
128 > Error in sys.excepthook:\r
129 > Traceback (most recent call last):\r
130 >   File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook\r
131 > ImportError: No module named fileutils\r
132\r
133 > Original exception was:\r
134 > Traceback (most recent call last):\r
135 >   File "/home/pazz/bin/nbook", line 167, in <module>\r
136 >   File "/home/pazz/bin/nbook", line 71, in __init__\r
137 >   File "/home/pazz/.local/lib/python2.7/site-packages/notmuch/message.py", line 233, in get_header\r
138 > notmuch.errors.NullPointerError\r
139 > nbook Patrick  3.20s user 5.47s system 12% cpu 1:11.65 total\r
140 > ------------------------------------\r
141\r
142 \r
143 Yes someone else pointed this out too.  Again I'm not sure how to\r
144 proceed here.  I had a quick look at this last week and it seemed to me\r
145 the limitation comes from within the python bindings for notmuch.  Do\r
146 you have any ideas?\r
147 \r
148 > Anyway, have fun hacking notmuch! If you are looking for a related project to bring in your python skills\r
149 > I could think of one or two :D\r
150 \r
151 That would be wonderful.  To give you my background, I'm a graduate\r
152 student in physics and I have to do a lot of C/C++ and python\r
153 programming for my research.  Contributing to FOSS projects seems like a\r
154 wonderful way to learn to collaborate and clean programming (we\r
155 physicists tend to be sloppy programmers :-p).\r
156 \r
157 > Best,\r
158 > /p\r
159 \r
160 Cheers,\r
161 \r
162 -- \r
163 Suvayu\r
164 \r
165 Open source is the future. It sets us free.\r