From: David Bremner <david@tethera.net>
To: Austin Clements <aclements@csail.mit.edu>
Cc: sfischme@uwaterloo.ca, Gaute Hope <eg@gaute.vetsj.com>,
notmuch <notmuch@notmuchmail.org>
Subject: Re: [PATCH] WIP: regexp matching in subjects
Date: Tue, 07 Jun 2016 07:16:27 -0300 [thread overview]
Message-ID: <87ziqx9udg.fsf@zancas.localnet> (raw)
In-Reply-To: <1465265149-7174-1-git-send-email-david@tethera.net>
David Bremner <david@tethera.net> writes:
> the idea is that you can run
>
> % notmuch search 'subject:rx:<your-favourite-regexp>'
>
> or
>
> % notmuch search subject:"your usual phrase search"
>
> This should also work with bindings.
> ---
>
> Here is Austin's "hack", crammed into the field processor framework.
> I seem to have broken one of the existing subject search tests with my
> recursive query parsing. I didn't have time to figure out why, yet.
A few hours sleep and I think I understand the issue.
with
subject:"your usual phrase search"
I believe the phrase-ness (word ordering and proximity) gets lost when
using a field processor. So, since I don't know if/when this issue will
be fixed in Xapian, we should probably use a seperate prefix for regexp
search. This leads to two potential syntaxes
subject_re:"^i am first"
regexp:subject:"^i am first"
If we did stick with the current syntax, one could use
subject:your-usual-phrase-search
to preserve phraseness. Note that for regexps with spaces in them, the
required quoting is a bit counterintuitive
./notmuch count 'subject:"rx:Graduate Committee"'
That's a consequence of my faking "sub-prefixes". Which seemed clever at
the time, but maybe not.
d
next prev parent reply other threads:[~2016-06-07 10:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 6:58 searching: '*analysis' vs 'reanalysis' Gaute Hope
2016-06-06 12:42 ` David Bremner
2016-06-06 12:53 ` Gaute Hope
2016-06-06 15:52 ` Sebastian Fischmeister
2016-06-06 17:29 ` David Bremner
2016-06-06 19:20 ` Austin Clements
2016-06-06 20:08 ` Gaute Hope
2016-06-06 20:22 ` Austin Clements
2016-06-07 2:05 ` [PATCH] WIP: regexp matching in subjects David Bremner
2016-06-07 10:16 ` David Bremner [this message]
2016-06-10 2:28 ` [PATCH] WIP: regexp matching in 'subject' and 'from' David Bremner
2016-06-10 2:42 ` David Bremner
2016-06-10 11:11 ` Tomi Ollila
2016-06-10 11:50 ` David Bremner
2016-06-10 8:38 ` Gaute Hope
2016-06-10 11:09 ` David Bremner
2016-06-11 16:32 ` Gaute Hope
2016-06-11 16:49 ` David Bremner
2016-06-11 17:09 ` Tomi Ollila
2016-06-11 17:34 ` Gaute Hope
2016-06-11 1:49 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ziqx9udg.fsf@zancas.localnet \
--to=david@tethera.net \
--cc=aclements@csail.mit.edu \
--cc=eg@gaute.vetsj.com \
--cc=notmuch@notmuchmail.org \
--cc=sfischme@uwaterloo.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).