Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 34 / b96cd2e097e00176afcd0d03c3d81a801395c5
1 Return-Path: <amdragon@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 A0DCF429E40\r
6         for <notmuch@notmuchmail.org>; Tue, 26 Apr 2011 16:55:18 -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.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 m+PmN0x9hGd6 for <notmuch@notmuchmail.org>;\r
17         Tue, 26 Apr 2011 16:55:18 -0700 (PDT)\r
18 Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com\r
19         [209.85.216.53]) (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 DF3BC429E38\r
22         for <notmuch@notmuchmail.org>; Tue, 26 Apr 2011 16:55:17 -0700 (PDT)\r
23 Received: by qwb7 with SMTP id 7so620353qwb.26\r
24         for <notmuch@notmuchmail.org>; Tue, 26 Apr 2011 16:55:14 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=domainkey-signature:mime-version:sender:in-reply-to:references:date\r
27         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
28         :content-transfer-encoding;\r
29         bh=EjJ4vnb9hXGGI6Eb1w4dCM2cxjd38673LrC6uXhgFCY=;\r
30         b=Z5bJEunGjrYF+j0ZatdDDZ8aWAZE+l7ioOsqDUVqwNB/JkUuz1ZSJFKhNRqa6pNl3v\r
31         Y9KarVCf5jaZQNKfB4gosKP8jnoyWl3QQtuOHfqjEWJJ78iekM62fgELebqZkFp18F9c\r
32         r9thwdTVY2IULmlAj5ac+vEE4ZbQulgOY7THc=\r
33 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
34         h=mime-version:sender:in-reply-to:references:date\r
35         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
36         :content-transfer-encoding;\r
37         b=SfXjiwfQ1D03bBmSa2braitVrfn+lgGxhFhyge0DzfTAR8TDshIPr7hrzwqQbRlRiO\r
38         GO5smB1/LfqH+CawIm273XCpyJbSObDUKHgSyc4/8aJbk7RAgZpSUgEXBNTyOLoOw9eK\r
39         XXMolHxqFCBkVmHCs84QvvlQpRYdSPduijO+A=\r
40 MIME-Version: 1.0\r
41 Received: by 10.229.131.23 with SMTP id v23mr1156475qcs.11.1303862114636; Tue,\r
42         26 Apr 2011 16:55:14 -0700 (PDT)\r
43 Sender: amdragon@gmail.com\r
44 Received: by 10.229.220.148 with HTTP; Tue, 26 Apr 2011 16:55:14 -0700 (PDT)\r
45 In-Reply-To: <87fwp4tzvd.fsf@eve.chaoflow.net>\r
46 References: <87fwp4tzvd.fsf@eve.chaoflow.net>\r
47 Date: Tue, 26 Apr 2011 19:55:14 -0400\r
48 X-Google-Sender-Auth: vDvm2-1VvfQL05K9buv_ZQQwFoU\r
49 Message-ID: <BANLkTinG_DdR5gdPr7=YkESPpY+apdD+Tg@mail.gmail.com>\r
50 Subject: Re: doc: notmuch help search-terms, boolean operators\r
51 From: Austin Clements <amdragon@mit.edu>\r
52 To: Florian Friesdorf <flo@chaoflow.net>\r
53 Content-Type: text/plain; charset=ISO-8859-1\r
54 Content-Transfer-Encoding: quoted-printable\r
55 Cc: notmuch@notmuchmail.org\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: Tue, 26 Apr 2011 23:55:18 -0000\r
69 \r
70 The full precedence is rather complicated, once you include all Xapian\r
71 operators and exceptions.  See\r
72 http://trac.xapian.org/browser/trunk/xapian-core/queryparser/queryparser.le=\r
73 mony,\r
74 particularly starting at line 1560.  Your precedence list is mostly\r
75 right, except that AND and NOT have the same precedence (and are\r
76 disambiguated by left-associativity in binary situations).\r
77 \r
78 I think the real question is what we *want* notmuch to support.  My\r
79 understanding from id:"8762rq8byr.fsf@yoom.home.cworth.org" is that\r
80 things like NEAR and ADJ were intentionally omitted from the\r
81 documentation; that while notmuch inherits them from the Xapian query\r
82 parser, they aren't considered part of the "notmuch" query syntax.  I\r
83 would also classify XOR as dubious (even the Xapian docs call it\r
84 esoteric), but I'm happy to be convinced otherwise.\r
85 \r
86 I'd love to know what people want from the query syntax for the\r
87 purposes of trimming down the custom query parser patch, and it would\r
88 also answer what should be documented (the current "etc" in the\r
89 documentation is just asking for trouble!).  I would propose "and",\r
90 "or", "not", "-" (and maybe "+" for symmetry, even though it's a\r
91 no-op), brackets, phrases, and wildcards, but what do other people\r
92 think?\r
93 \r
94 On Tue, Apr 26, 2011 at 6:24 PM, Florian Friesdorf <flo@chaoflow.net> wrote=\r
95 :\r
96 >\r
97 > `notmuch help search-terms` currently states: "In addition to\r
98 > individual terms, multiple terms can be combined with Boolean operators\r
99 > ("and", "or", "not", etc.).".\r
100 >\r
101 > I would like to replace the "etc" with a full list and document the\r
102 > operator precedence.\r
103 >\r
104 > In lib/notmuch.h for notmuch_query_create I found a pointer to xapian\r
105 > docs [2], which states that AND takes precedence over OR, but nothing\r
106 > for NOT and XOR.\r
107 >\r
108 > Through playing with `notmuch tag` and `notmuch search\r
109 > --output=3Dmessages` I found:\r
110 >\r
111 > Complete list of boolean operators in order of precedence:\r
112 > - NOT\r
113 > - AND\r
114 > - XOR\r
115 > - OR\r
116 >\r
117 > Is this correct? If yes, I would extend the manpage accordingly.\r
118 >\r
119 > [2] http://xapian.org/docs/queryparser.html\r
120 >\r
121 > --\r
122 > Florian Friesdorf <flo@chaoflow.net>\r
123 > =A0GPG FPR: 7A13 5EEE 1421 9FC2 108D =A0BAAF 38F8 99A3 0C45 F083\r
124 > Jabber/XMPP: flo@chaoflow.net\r
125 > IRC: chaoflow on freenode,ircnet,blafasel,OFTC\r
126 >\r
127 > _______________________________________________\r
128 > notmuch mailing list\r
129 > notmuch@notmuchmail.org\r
130 > http://notmuchmail.org/mailman/listinfo/notmuch\r
131 >\r
132 >\r