Re: [PATCH] WIP: regexp matching in 'subject' and 'from'

Subject: Re: [PATCH] WIP: regexp matching in 'subject' and 'from'

Date: Fri, 10 Jun 2016 08:38:05 +0000

To: David Bremner, Austin Clements

Cc: sfischme@uwaterloo.ca, notmuch

From: Gaute Hope


David Bremner writes on juni 10, 2016 4:28:
> the idea is that you can run
> 
> % notmuch search subject_re:<your-favourite-regexp>
> % notmuch search from_re:<your-favourite-regexp>'
> 
> or
> 
> % notmuch search subject:"your usual phrase search"
> % notmuch search from:"usual phrase search"
> 
> This should also work with bindings, since it extends the query parser.
> 
> This is trivial to extend for other value slots, but currently the only
> value slots are date, message_id, from, subject, and last_mod. Date is
> already searchable, and message_id is not obviously useful to regex
> match.
> ---
> 
> This is more or less complete codewise, it fixes the know problems
> with the last version. Names of prefixes are debatable, and of course
> it needs doc and tests.  I don't see any reason not to do this at the moment,
> since it's basically free; no new terms are added to the database.

Cool!

Would it break a lot of things if you just replace the original prefix?

Could it be made to work on the message body?

Regards, Gaute


Thread: