Re: [Patch v2] lib: regexp matching in 'subject' and 'from'

Subject: Re: [Patch v2] lib: regexp matching in 'subject' and 'from'

Date: Wed, 18 Jan 2017 17:01:29 -0400

To: Jani Nikula, notmuch@notmuchmail.org

Cc:

From: David Bremner


Jani Nikula <jani@nikula.org> writes:


> I played around with this a bit, and it seemed to work. Unsurprisingly,
> getting the quoting right was the hardest part. Even though I know how
> the stuff works under the hood, it took me a while to realize that you
> have to use 're:"subject:<regex with spaces>"' to make it work. (I kept
> trying 're:subject:"<regex with spaces>"'.) I don't know if there's
> anything we could really do about this.
>

I _think_ we could add distinct prefixes at the xapian level for each
regex-prefix. That opens the can of worms of naming them eg re-subject:
and re-from:. I'm not sure about the added complexity, but I think it's
a matter of adding an extra argument to the field processor constructor.

d

Thread: