[PATCH 2/2] lib: handle empty string in regexp field processors

2017-03-24 Thread David Bremner
The non-field processor behaviour is is convert the corresponding queries into a search for the unprefixed terms. This yields pretty surprising results so I decided to generate a query that would match the terms (i.e. none with that prefix) generated for an empty header. --- lib/regexp-fields.cc

revised foo:"" handling

2017-03-24 Thread David Bremner
This obsoletes the first two patches of id:20170318030303.17344-1-da...@tethera.net I think this is a more meaningful interpretation than matching all messages. ___ notmuch mailing list notmuch@notmuchmail.org

[PATCH 1/2] test: add known broken test for null from: and subject: query

2017-03-24 Thread David Bremner
These queries currently fail with field processors enabled because the code expects a non-empty string. --- test/T650-regexp-query.sh | 20 1 file changed, 20 insertions(+) diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh index 61739e87..f2ae1387 100755 ---

Re: [PATCH] tests: add compatibility layer

2017-03-24 Thread Mikhail
On 16:32 09-Mar 2017 David Bremner wrote: > From: Mikhail > > Make test-lib-common.sh load test-lib-<$PLATFORM>.sh to create > additional shim for platform specifics. > > Use test-lib-FREEBSD.sh to call GNU utilities instead of native ones. > > - amended by db following

[PATCH 2/2] lib: Add regexp expansion for for tags and paths

2017-03-24 Thread David Bremner
From a ui perspective this looks similar to what was already provided for from, subject, and mid, but the implimentation is quite different. It uses the database's list of terms to construct a term based query equivalent to the passed regular expression. --- doc/man7/notmuch-search-terms.rst |

regexp search for more things

2017-03-24 Thread David Bremner
This series combines the mid: searching patch left out of 0.24 [1] with the WIP patch of [2] adding regexp search for tags and paths. It is rebased on the regexp fixes of [3], which should hopefully be merged soon. [1]: id:20170227023422.26929-5-da...@tethera.net [2]:

[PATCH 1/2] lib: Add regexp searching for mid: prefix

2017-03-24 Thread David Bremner
The bulk of the change is passing in the field options to the regexp field processor, so that we can properly handle the fallback (non-regexp case). --- doc/man7/notmuch-search-terms.rst | 26 +++--- lib/database.cc | 6 -- lib/regexp-fields.cc