]> git.notmuchmail.org Git - notmuch/commit
lib: regexp matching in 'subject' and 'from'
authorDavid Bremner <david@tethera.net>
Mon, 27 Feb 2017 02:34:20 +0000 (22:34 -0400)
committerDavid Bremner <david@tethera.net>
Fri, 3 Mar 2017 21:46:48 +0000 (17:46 -0400)
commit55524bb063c95ae51a1762eb0b1aacce6ca49223
tree06ec5e27a5d20ca917bbff7e9d732ab94cff0fc2
parent31b8ce4558de69860c95bf319a0a162316dce6c6
lib: regexp matching in 'subject' and 'from'

the idea is that you can run

% notmuch search subject:/<your-favourite-regexp>/
% notmuch search from:/<your-favourite-regexp>/

or

% notmuch search subject:"your usual phrase search"
% notmuch search from:"usual phrase search"

This feature is only available with recent Xapian, specifically
support for field processors is needed.

It should work with bindings, since it extends the query parser.

This is easy 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;  message_id is left for a followup commit.

This was originally written by Austin Clements, and ported to Xapian
field processors (from Austin's custom query parser) by yours truly.
doc/man7/notmuch-search-terms.rst
lib/Makefile.local
lib/database.cc
lib/regexp-fields.cc [new file with mode: 0644]
lib/regexp-fields.h [new file with mode: 0644]
test/T650-regexp-query.sh [new file with mode: 0755]