notmuch.el: controlling what does and doesn't get expanded in searches
[notmuch-archives.git] / 13 / 4a6a1c747c9d2484cd530abda5e0f34c7f1056
1 Return-Path: <tomi.valkeinen@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 39611431FBF\r
6         for <notmuch@notmuchmail.org>; Tue, 19 Nov 2013 04:40:32 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.699\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,\r
13         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 Y0BH+nfC8Cnj for <notmuch@notmuchmail.org>;\r
17         Tue, 19 Nov 2013 04:40:08 -0800 (PST)\r
18 Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com\r
19         [209.85.217.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 91D96431FBC\r
22         for <notmuch@notmuchmail.org>; Tue, 19 Nov 2013 04:40:08 -0800 (PST)\r
23 Received: by mail-lb0-f180.google.com with SMTP id w6so2532651lbh.39\r
24         for <notmuch@notmuchmail.org>; Tue, 19 Nov 2013 04:40:04 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject\r
27         :references:in-reply-to:content-type;\r
28         bh=Y2pzQekBi6H7thor2D/iNVHkMUzKVPGYE9sLSx/8Mf4=;\r
29         b=ux9Z4rZtyjWJ77FzTC7oJgQGg3DV4zf8sKI3aD4UOtuRca4agsaxqrXs23m/QzeQRq\r
30         OZZYhCMQLSHOrfQr/HwD3jTbYnKZmNQcC7HQNJIUE5RkpL9EmsrYA08JINDAuPsxxZJe\r
31         DbA2QLLL6XWiaX9dzWIlGuvUKGnb3HncYefybIp8AcMvIsG/SY20crLY7SG3cCyYq4Fd\r
32         ekrhqtKXoGb3JbD3QAh9FTtvrnycFiHEqrNcfY/6MjIqBJr00rSrsD4L7nuu3SjXnHV0\r
33         EBCKgf0ftwCXpa1s+0d5KekrMiMSuFqTcOdlDwT+OO4ygvbwoQxoQptTx6lzxvZPcwiy\r
34         hB+Q==\r
35 X-Received: by 10.112.73.3 with SMTP id h3mr18029116lbv.4.1384864802092;\r
36         Tue, 19 Nov 2013 04:40:02 -0800 (PST)\r
37 Received: from [192.168.1.3] (a91-156-160-115.elisa-laajakaista.fi.\r
38         [91.156.160.115]) by mx.google.com with ESMTPSA id\r
39         xc10sm15735270lbb.6.2013.11.19.04.39.59 for <multiple recipients>\r
40         (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);\r
41         Tue, 19 Nov 2013 04:40:00 -0800 (PST)\r
42 Sender: Tomi Valkeinen <tomi.valkeinen@gmail.com>\r
43 Message-ID: <528B5C1F.4050908@iki.fi>\r
44 Date: Tue, 19 Nov 2013 14:39:59 +0200\r
45 From: Tomi Valkeinen <tomi.valkeinen@iki.fi>\r
46 User-Agent: Mozilla/5.0 (X11; Linux x86_64;\r
47         rv:24.0) Gecko/20100101 Thunderbird/24.1.0\r
48 MIME-Version: 1.0\r
49 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
50 Subject: Re: notmuch-lib questions and observations\r
51 References: <528A26F4.3040006@iki.fi> <87bo1gio9c.fsf@nikula.org>\r
52 In-Reply-To: <87bo1gio9c.fsf@nikula.org>\r
53 X-Enigmail-Version: 1.6\r
54 Content-Type: multipart/signed; micalg=pgp-sha1;\r
55         protocol="application/pgp-signature";\r
56         boundary="oxINwwJVIHxoqmI1oHjGuBQ3Al986pbba"\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Tue, 19 Nov 2013 12:40:32 -0000\r
70 \r
71 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)\r
72 --oxINwwJVIHxoqmI1oHjGuBQ3Al986pbba\r
73 Content-Type: text/plain; charset=ISO-8859-1\r
74 Content-Transfer-Encoding: quoted-printable\r
75 \r
76 On 2013-11-19 14:12, Jani Nikula wrote:\r
77 > On Mon, 18 Nov 2013, Tomi Valkeinen <tomi.valkeinen@iki.fi> wrote:\r
78 >> Hi,\r
79 >>\r
80 >> I found out about notmuch quite recently, and now I've been tinkering\r
81 >> with it, prototyping a GUI client. I have some questions and observati=\r
82 ons:\r
83 >=20\r
84 > Hello Tomi, glad you've found notmuch too! ;)\r
85 \r
86 Well, I'm still using Thunderbird... ;)\r
87 \r
88 >> 3.\r
89 >>\r
90 >> How is a client using notmuch supposed to find out there are new\r
91 >> messages, and which messages are new?\r
92 >=20\r
93 > 'notmuch new' tags any new messages it finds with tags specified in\r
94 > new.tags config option (man notmuch-config), "inbox" and "unread" by\r
95 > default. Some people like to change that to "new", and run a post-new\r
96 > hook (man notmuch-hooks) that looks at messages matching tag:new,\r
97 > retagging as desired.\r
98 >=20\r
99 >> My current thought is to make 'notmuch new' run a script that tags the=\r
100 \r
101 >> messages, and make it add a 'new-gui' or such tag to all new messages.=\r
102 \r
103 >> The client would then periodically make a query for that tag, and at t=\r
104 he\r
105 >> same time remove the tag for any returned messages.\r
106 >=20\r
107 > As said, 'notmuch new' does that, and it can also run a script for you.=\r
108 \r
109 \r
110 I think I wasn't very clear on what I meant. I was thinking about the\r
111 behavior that graphical mail clients have: they periodically refresh the\r
112 emails, showing new ones if there are any, and they'll show some icon or\r
113 such which tells the user this email is "new" (which could mean received\r
114 in the last periodic refresh).\r
115 \r
116 So with notmuch, the client would somehow need to know that there has\r
117 been changes in the database, and then know which emails are new.\r
118 \r
119 For the former, I have no good idea as there doesn't seem to be any way\r
120 to find out the db was changed since the last open. For the latter, I\r
121 guess the tagging method I mentioned above should work.\r
122 \r
123 If the xapian document id was available, I believe it could also be used\r
124 for the latter, as it should always be increasing.\r
125 \r
126 >> 5.\r
127 >>\r
128 >> This one is just a vague thought that came to my mind. At the moment\r
129 >> notmuch hides Xapian totally behind notmuch's interface, which probabl=\r
130 y\r
131 >> makes things simpler (and gives a nice C API), but also (afaik) preven=\r
132 ts\r
133 >> using Xapian features that are not at the moment supported in the\r
134 >> notmuch API.\r
135 >>\r
136 >> I wonder how would an approach work where notmuch would be a bit more\r
137 >> like a helper library, allowing full use of Xapian's features but maki=\r
138 ng\r
139 >> it simple to manage notmuch database. So, for example, when making a\r
140 >> query, you'd create a Xapian query with notmuch, and then use Xapian t=\r
141 o\r
142 >> run the query.\r
143 >>\r
144 >> I don't have anything clear in mind, and obviously Xapian being C++\r
145 >> might make the whole idea unimplementable.\r
146 >=20\r
147 > I think the database implementation has been abstracted on purpose, so\r
148 > we could, at least in theory, switch from xapian to something else. I\r
149 > don't know how feasible that would be though. I think Austin has\r
150 > experimented with that.\r
151 \r
152 Ah, a valid point, I didn't think of that.\r
153 \r
154  Tomi\r
155 \r
156 \r
157 \r
158 --oxINwwJVIHxoqmI1oHjGuBQ3Al986pbba\r
159 Content-Type: application/pgp-signature; name="signature.asc"\r
160 Content-Description: OpenPGP digital signature\r
161 Content-Disposition: attachment; filename="signature.asc"\r
162 \r
163 -----BEGIN PGP SIGNATURE-----\r
164 Version: GnuPG v1.4.14 (GNU/Linux)\r
165 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/\r
166 \r
167 iQIcBAEBAgAGBQJSi1wfAAoJEPo9qoy8lh71+UUP/j6LEk8MvjGaLXzx9Wm1x2DI\r
168 PqFtZH/dFXjKwYOi4PJjVTmJdocCR+O0e+V3CijjufsZubANSoHYLt+OLXBuCmoW\r
169 lfpZ5t8SLe/JNErCwJaQTjtyUeAfiPlmc/6uiui1sFaktmC3Gs5CbHlyEBoclSah\r
170 M2XXFedYcAg7IUTzTJLy6ML1GiCakJpFSMnI5MPnc5Lper/mGZ56B3Sp4kT4FzKu\r
171 c7+XnbItzcBJBf4pRM2AwBly3Ha1i2B6OaKfn4mn+6sWwoXYJtUqxqND72H00B6+\r
172 ok2OpYzojLMSVwN3iXDG54oOkBrisSkiqLlWyqnuvy9ZaIGEr0s3A2QTQzD+d69J\r
173 X8YpolAP919difctmFDEVizoOXartpQDO+Sn9nwmZX05PwZcPlA51qWMiQdgYQwK\r
174 7EvwLfvAbYEFPR7FCuC2ar45DQguGANDW0+5M1RU1wF22V5XqO9svSxGWF3T/vjH\r
175 M+NFf2M9vvF9FkCaHHF6CowVr7eIMlSKQwhwvTQSgLwxEu0ZCbRLnTMMr3pL9gYC\r
176 3WJ6EepSUimunQT8g5uBXKaXUOk9Dhbt+f/HCDyVy1x3bNrp3J2zAJsJsTf92s6D\r
177 cRrNxO3uu1dX65q4lJDR0Ll1Iit0Zfsf2rM5FUGoIiLGY5Fuwo3tsveb3nfyNsCQ\r
178 pfqN+B2DpF3FIjXWVyR2\r
179 =zxrZ\r
180 -----END PGP SIGNATURE-----\r
181 \r
182 --oxINwwJVIHxoqmI1oHjGuBQ3Al986pbba--\r