Re: S/MIME support in notmuch
[notmuch-archives.git] / fa / 89a668321737d2ff00a35d221fb760943fd536
1 Return-Path: <olly@survex.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 77B474196F2\r
6         for <notmuch@notmuchmail.org>; Mon,  5 Jul 2010 00:34:03 -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: -4.2\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 zi0Uf89+UH7I for <notmuch@notmuchmail.org>;\r
16         Mon,  5 Jul 2010 00:33:52 -0700 (PDT)\r
17 Received: from atreus.tartarus.org (atreus.tartarus.org [80.252.125.10])\r
18         by olra.theworths.org (Postfix) with ESMTP id 9496D40B903\r
19         for <notmuch@notmuchmail.org>; Mon,  5 Jul 2010 00:33:52 -0700 (PDT)\r
20 Received: from olly by atreus.tartarus.org with local (Exim 4.69)\r
21         (envelope-from <olly@survex.com>)\r
22         id 1OVgBa-0003H9-Au; Mon, 05 Jul 2010 08:33:50 +0100\r
23 Date: Mon, 5 Jul 2010 08:33:50 +0100\r
24 From: Olly Betts <olly@survex.com>\r
25 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
26 Subject: Re: [PATCH 2/5] Add quotes around id:"message-id" queries.\r
27 Message-ID: <20100705073350.GB4161@survex.com>\r
28 References: <1278000507-22290-1-git-send-email-dmitry.kurochkin@gmail.com>\r
29         <1278000507-22290-3-git-send-email-dmitry.kurochkin@gmail.com>\r
30         <slrni2qrg7.chp.olly@msgid.survex.com> <87bpaq6nm9.fsf@gmail.com>\r
31 MIME-Version: 1.0\r
32 Content-Type: text/plain; charset=us-ascii\r
33 Content-Disposition: inline\r
34 In-Reply-To: <87bpaq6nm9.fsf@gmail.com>\r
35 User-Agent: Mutt/1.5.18 (2008-05-17)\r
36 Cc: notmuch@notmuchmail.org\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Mon, 05 Jul 2010 07:34:04 -0000\r
50 \r
51 On Fri, Jul 02, 2010 at 05:04:46PM +0400, Dmitry Kurochkin wrote:\r
52 > On Fri, 2 Jul 2010 04:41:43 +0000 (UTC), Olly Betts <olly@survex.com> wrote:\r
53 > > On 2010-07-01, Dmitry Kurochkin wrote:\r
54 > > > -  (concat "id:" (notmuch-show-get-prop :id props)))\r
55 > > > +  (concat "id:\"" (notmuch-show-get-prop :id props) "\""))\r
56 > > \r
57 > > This is probably a good idea (the ".." example is arguably a Xapian bug so\r
58 > > that should be fixed soon, but you find all sorts of junk in message-ids.\r
59\r
60 > If I comment out add_valuerangeprocessor call in\r
61 > notmuch_database_open(), ids with .. are matched fine with no quotes.\r
62 \r
63 Yes, the code which checks for ranges is disabled if there are no possible\r
64 ranges to find.\r
65 \r
66 > So it seems that xapian uses the ValueRangeProcessor for all terms\r
67 > while it should be used for one value parsing only. Is this correct?\r
68 \r
69 The issue is that if there's a ".." in there you have to ask the VRPs to\r
70 find out if it is a range they understand or not, so they have to be called\r
71 first in such cases (otherwise the same prefix couldn't be made to work for\r
72 ranges and single term filters).  There needs to be some sort of fallback\r
73 to considering boolean filters if there isn't a valid range though.\r
74 \r
75 > Is there a xapian bug for this?\r
76 \r
77 I couldn't find a ticket for it, but I was aware of the issue.\r
78 \r
79 I've committed a fix to Xapian now (r14790 on trunk), which should be in\r
80 Xapian 1.2.3 when it gets released.\r
81 \r
82 > I have found a xapian bug #128 "Allow queryparser to treat some prefixes\r
83 > as literal text". Seems to be just what we need here. Perhaps instead of\r
84 > quoting in emacs client, we can wait for the value range parsing fix\r
85 > (can be fixed in minor release?) and use #128 when it is available. IMHO\r
86 > should be good enought in most cases. What do you think?\r
87 \r
88 The main problem at the moment is with "..", which is now fixed on trunk.\r
89 So any Xapian version with #128 fully addressed will handle ".." in\r
90 message-ids fine anyway.\r
91 \r
92 With current trunk, message-ids with whitespace or ')' in will still\r
93 misbehave unless you quote them.  If the "FieldProcessor" idea in #128 were\r
94 implemented, you could arrange for whitespace and ')' to be included, but\r
95 then it would be impossible to end a message-id term - it would span to the\r
96 end of the query string, which I think would surprise most users.\r
97 \r
98 The ability to quote terms discussed in #128 is already implemented (that\r
99 is what you've been using!) and I think that using this selectively is\r
100 probably the best way to deal with this.\r
101 \r
102 If you only try to quote message-ids which either:\r
103 \r
104 * contain whitespace, "..", or ')'\r
105 * start with '"'\r
106 \r
107 Then the only cases which break with older Xapian will be those which\r
108 wouldn't work there anyway, plus message-ids which start with a '"' (which \r
109 seem rare - I couldn't find any in my mail folders).\r
110 \r
111 Cheers,\r
112     Olly\r