1 Return-Path: <david@tethera.net>
\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 arlo.cworth.org (Postfix) with ESMTP id 878306DE00DA
\r
6 for <notmuch@notmuchmail.org>; Tue, 7 Jun 2016 03:16:49 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.011 tagged_above=-999 required=5
\r
12 tests=[AWL=-0.000, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]
\r
14 Received: from arlo.cworth.org ([127.0.0.1])
\r
15 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id q9H0-Ux0xJ0z for <notmuch@notmuchmail.org>;
\r
17 Tue, 7 Jun 2016 03:16:41 -0700 (PDT)
\r
18 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])
\r
19 by arlo.cworth.org (Postfix) with ESMTPS id B07C76DE00D3
\r
20 for <notmuch@notmuchmail.org>; Tue, 7 Jun 2016 03:16:41 -0700 (PDT)
\r
21 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)
\r
22 (envelope-from <david@tethera.net>)
\r
23 id 1bAE3V-00061n-9c; Tue, 07 Jun 2016 06:16:17 -0400
\r
24 Received: (nullmailer pid 14467 invoked by uid 1000);
\r
25 Tue, 07 Jun 2016 10:16:27 -0000
\r
26 From: David Bremner <david@tethera.net>
\r
27 To: Austin Clements <aclements@csail.mit.edu>
\r
28 Cc: sfischme@uwaterloo.ca, Gaute Hope <eg@gaute.vetsj.com>,
\r
29 notmuch <notmuch@notmuchmail.org>
\r
30 Subject: Re: [PATCH] WIP: regexp matching in subjects
\r
31 In-Reply-To: <1465265149-7174-1-git-send-email-david@tethera.net>
\r
33 <CAH-f9WtC6CeVecfg8wFZUVc8K2rUfzsP72xo97sJX2y_mLW6-g@mail.gmail.com>
\r
34 <1465265149-7174-1-git-send-email-david@tethera.net>
\r
35 User-Agent: Notmuch/0.22+28~gb9bf3f4 (http://notmuchmail.org) Emacs/24.5.1
\r
36 (x86_64-pc-linux-gnu)
\r
37 Date: Tue, 07 Jun 2016 07:16:27 -0300
\r
38 Message-ID: <87ziqx9udg.fsf@zancas.localnet>
\r
40 Content-Type: text/plain
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.20
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Tue, 07 Jun 2016 10:16:49 -0000
\r
55 David Bremner <david@tethera.net> writes:
\r
57 > the idea is that you can run
\r
59 > % notmuch search 'subject:rx:<your-favourite-regexp>'
\r
63 > % notmuch search subject:"your usual phrase search"
\r
65 > This should also work with bindings.
\r
68 > Here is Austin's "hack", crammed into the field processor framework.
\r
69 > I seem to have broken one of the existing subject search tests with my
\r
70 > recursive query parsing. I didn't have time to figure out why, yet.
\r
72 A few hours sleep and I think I understand the issue.
\r
76 subject:"your usual phrase search"
\r
78 I believe the phrase-ness (word ordering and proximity) gets lost when
\r
79 using a field processor. So, since I don't know if/when this issue will
\r
80 be fixed in Xapian, we should probably use a seperate prefix for regexp
\r
81 search. This leads to two potential syntaxes
\r
83 subject_re:"^i am first"
\r
85 regexp:subject:"^i am first"
\r
87 If we did stick with the current syntax, one could use
\r
89 subject:your-usual-phrase-search
\r
91 to preserve phraseness. Note that for regexps with spaces in them, the
\r
92 required quoting is a bit counterintuitive
\r
94 ./notmuch count 'subject:"rx:Graduate Committee"'
\r
96 That's a consequence of my faking "sub-prefixes". Which seemed clever at
\r
97 the time, but maybe not.
\r