1 Return-Path: <amdragon@mit.edu>
\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 79719431FAF
\r
6 for <notmuch@notmuchmail.org>; Tue, 27 Mar 2012 00:01:59 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\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 TRKZCiH6bAhs for <notmuch@notmuchmail.org>;
\r
16 Tue, 27 Mar 2012 00:01:59 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id D64C7431FAE
\r
20 for <notmuch@notmuchmail.org>; Tue, 27 Mar 2012 00:01:58 -0700 (PDT)
\r
21 X-AuditID: 1209190f-b7f8a6d000000914-ab-4f7165e53a39
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 14.60.02324.5E5617F4; Tue, 27 Mar 2012 03:01:57 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q2R71u2w005720;
\r
27 Tue, 27 Mar 2012 03:01:57 -0400
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q2R71rn7023101
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Tue, 27 Mar 2012 03:01:55 -0400 (EDT)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1SCQPg-0007kJ-Dp; Tue, 27 Mar 2012 03:01:52 -0400
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
\r
39 Subject: Re: [PATCH 0/2] Escape message ID queries in Emacs
\r
40 In-Reply-To: <m2sjgutuck.fsf@guru.guru-group.fi>
\r
41 References: <1332812236-20387-1-git-send-email-amdragon@mit.edu>
\r
42 <m2sjgutuck.fsf@guru.guru-group.fi>User-Agent:
\r
43 Notmuch/0.12+68~g2b97293 (http://notmuchmail.org) Emacs/23.3.1
\r
45 Date: Tue, 27 Mar 2012 03:01:52 -0400
\r
46 Message-ID: <87aa32h6hr.fsf@awakening.csail.mit.edu>
\r
48 Content-Type: text/plain; charset=us-ascii
\r
49 X-Brightmail-Tracker:
\r
50 H4sIAAAAAAAAA+NgFrrCIsWRmVeSWpSXmKPExsUixCmqrPs0tdDfYGWDisX1mzOZLd6snMfq
\r
51 wORx+OtCFo9nq24xBzBFcdmkpOZklqUW6dslcGU07zjAVLCTp+Jkr34DYzdXFyMnh4SAicTf
\r
52 Q7eYIWwxiQv31rN1MXJxCAnsY5S4vPwvI4SzgVHi9/ePzBDOSSaJJ1fvQpUtYZR42vGNEaSf
\r
53 TUBDYtv+5WC2iICtxJUlJ1lBbGEBa4kH/x+zg9icAgYSkz5PZ4doPsQoMefuf6YuRg4OFgFV
\r
54 id710SAmL9BNP+Z6g5TzCghKnJz5hAXEZhbQkrjx7yXTBEb+WUhSs5CkFjAyrWKUTcmt0s1N
\r
55 zMwpTk3WLU5OzMtLLdI10cvNLNFLTSndxAgOPEn+HYzfDiodYhTgYFTi4TWaXuAvxJpYVlyZ
\r
56 e4hRkoNJSZTXI7nQX4gvKT+lMiOxOCO+qDQntRjoXg5mJRFe7SigHG9KYmVValE+TEqag0VJ
\r
57 nFdN652fkEB6YklqdmpqQWoRTFaGg0NJglcfGGFCgkWp6akVaZk5JQhpJg5OkOE8QMNNQGp4
\r
58 iwsSc4sz0yHypxgVpcR5A0ASAiCJjNI8uF5YYnjFKA70ijCvKUgVDzCpwHW/AhrMBDR4yZF8
\r
59 kMEliQgpqQbGxCtFExVyE6zkmBRTrwnNOmacrGrC9TAu/5/PbC2NubIf2M0O7bOVqJI4Hy/i
\r
60 lKqq21r8cgX/7EcaLsX3PtXFP/34ILTHsO4eZ5Z1nGvaVWmnHhGTxPZ5Ev6/Uj+rHa/7EBQ6
\r
61 YWr3Ws2Jeoa/mSKsb0xRelH6We/LMaUkleLWfN0tnulGQUosxRmJhlrMRcWJAE5bLynnAgAA
\r
62 X-BeenThere: notmuch@notmuchmail.org
\r
63 X-Mailman-Version: 2.1.13
\r
65 List-Id: "Use and development of the notmuch mail system."
\r
66 <notmuch.notmuchmail.org>
\r
67 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
69 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
70 List-Post: <mailto:notmuch@notmuchmail.org>
\r
71 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
72 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
73 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
74 X-List-Received-Date: Tue, 27 Mar 2012 07:01:59 -0000
\r
76 On Tue, 27 Mar 2012, Tomi Ollila <tomi.ollila@iki.fi> wrote:
\r
77 > On Tue, Mar 27 2012, Austin Clements wrote:
\r
79 >> Currently, Emacs does not escape message ID queries and is
\r
80 >> inconsistent about quoting them. This patch centralizes this in one
\r
81 >> function that always produces a properly quoted and escaped message ID
\r
84 >> With this, Emacs no longer gets confused by Tomi's crazy message,
\r
85 >> id:"id:""1332281811-24710-2b-git-send-email-tomi.ollila@iki.fi"""
\r
87 > LGTM. Things work!
\r
90 > One observation, though:
\r
92 > In search bar the following queries return one match:
\r
94 > id:id:"1332281811-24710-2b-git-send-email-tomi.ollila@iki.fi"
\r
95 > id:"id:""1332281811-24710-2b-git-send-email-tomi.ollila@iki.fi"""
\r
99 > id:"id:"1332281811-24710-2b-git-send-email-tomi.ollila@iki.fi""
\r
101 > return 0 matches.
\r
103 > It looks like the (above) search strings goes verbatim to command line
\r
105 > i.e. 'notmuch' 'search' '--sort=oldest-first' 'id:...'
\r
107 > can be used to compare... so that would be CLI issue if there
\r
108 > is ever need to do do anything with it.
\r
110 I'm not sure I would consider this a CLI "issue". It may not be
\r
111 intuitive, but it is an intentional part of the Xapian query parser's
\r
112 grammar. If a boolean prefix is followed immediately by a quote, then
\r
113 the term is between that quote and the next quote, modulo an escaping
\r
114 rule that lets you include a literal quote in the term by doubling it in
\r
115 the query string. Together, these rules let you reliably put anything
\r
116 in a boolean search term.
\r
120 > Thanks for fixing this.
\r