1 Return-Path: <keithp@keithp.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 EE09C431FAE
\r
6 for <notmuch@notmuchmail.org>; Mon, 23 Nov 2009 10:26:53 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id W4mxHZfasADF for <notmuch@notmuchmail.org>;
\r
11 Mon, 23 Nov 2009 10:26:52 -0800 (PST)
\r
12 Received: from keithp.com (home.keithp.com [63.227.221.253])
\r
13 by olra.theworths.org (Postfix) with ESMTP id 42935431FBC
\r
14 for <notmuch@notmuchmail.org>; Mon, 23 Nov 2009 10:26:52 -0800 (PST)
\r
15 Received: from localhost (localhost [127.0.0.1])
\r
16 by keithp.com (Postfix) with ESMTP id 8967C7600E3;
\r
17 Mon, 23 Nov 2009 10:26:51 -0800 (PST)
\r
18 X-Virus-Scanned: Debian amavisd-new at keithp.com
\r
19 Received: from keithp.com ([127.0.0.1])
\r
20 by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024)
\r
21 with LMTP id Uxyq+LQL6hZq; Mon, 23 Nov 2009 10:26:48 -0800 (PST)
\r
22 Received: by keithp.com (Postfix, from userid 1033)
\r
23 id AB0F7B84011; Mon, 23 Nov 2009 10:26:48 -0800 (PST)
\r
24 Received: from keithp.com (localhost [127.0.0.1])
\r
25 by keithp.com (Postfix) with ESMTP id 9E58C7600E3;
\r
26 Mon, 23 Nov 2009 10:26:48 -0800 (PST)
\r
27 From: Keith Packard <keithp@keithp.com>
\r
28 To: Jed Brown <jed@59A2.org>, notmuch@notmuchmail.org, cworth@cworth.org
\r
29 In-Reply-To: <1258999643-30742-1-git-send-email-jed@59A2.org>
\r
30 References: <1258976966-22407-1-git-send-email-jed@59A2.org>
\r
31 <1258999643-30742-1-git-send-email-jed@59A2.org>
\r
32 Date: Mon, 23 Nov 2009 10:26:47 -0800
\r
33 Message-ID: <yuny6lxnllk.fsf@aiko.keithp.com>
\r
35 Content-Type: multipart/signed; boundary="=-=-=";
\r
36 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
37 Subject: Re: [notmuch] [PATCH] Make search filters handle disjunctive
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.12
\r
42 List-Id: "Use and development of the notmuch mail system."
\r
43 <notmuch.notmuchmail.org>
\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
47 List-Post: <mailto:notmuch@notmuchmail.org>
\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
51 X-List-Received-Date: Mon, 23 Nov 2009 18:26:54 -0000
\r
54 Content-Transfer-Encoding: quoted-printable
\r
56 On Mon, 23 Nov 2009 19:07:23 +0100, Jed Brown <jed@59A2.org> wrote:
\r
58 > notmuch-search-filter accepts now accepts an arbitrary query and will
\r
59 > group if necessary so that we get
\r
61 > tag:inbox AND (gravy OR biscuits)
\r
63 > notmuch-search-filter-tag now handles multiple terms. All terms in the
\r
64 > query except AND and OR are interpreted as tags.
\r
66 Remember to split patches which do more than one thing into separate
\r
69 > + (let ((grouped-query (if (string-match-p notmuch-search-disjunctive-re=
\r
70 gexp query) (concat "( " query " )") query)))
\r
71 > + (notmuch-search (concat notmuch-search-query-string " and " grouped-=
\r
72 query) notmuch-search-oldest-first)))
\r
74 Is there some reason not to just always add the parens?
\r
76 > + (let ((tagged-query (replace-regexp-in-string notmuch-search-valid-ter=
\r
78 > + (lambda (match) ; Prepend `tag:' to all except boolean operators
\r
79 > + (if (string-match-p notmuch-search-boolean-operator-regexp match)
\r
80 > + match (concat "tag:" match)))
\r
83 This seems useful; how does it deal with the tag completion stuff?
\r
86 keith.packard@intel.com
\r
89 Content-Type: application/pgp-signature
\r
91 -----BEGIN PGP SIGNATURE-----
\r
92 Version: GnuPG v1.4.10 (GNU/Linux)
\r
94 iD8DBQFLCtPoQp8BWwlsTdMRAl1BAJ9mOfP6NR4FpfkWfrfbjU/4EArVpwCfUazA
\r
95 dnK9vAUjOe/iVYyTwOOtEh4=
\r
97 -----END PGP SIGNATURE-----
\r