[patch v5 6/6] lib: Add regexp searching for mid: prefix

2017-02-16 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). --- lib/database.cc | 11 +++ lib/regexp-fields.cc | 28 +--- lib/regexp-fields.h | 4 +++- 3 files changed,

[patch v5 3/6] lib: create field processors from prefix table

2017-02-16 Thread David Bremner
This is a bit more code than hardcoding the two existing field processors, but it should make it easy to add more. --- lib/database-private.h | 3 ++- lib/database.cc| 45 +++-- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git

[patch v5 1/6] lib: merge internal prefix tables

2017-02-16 Thread David Bremner
Replace multiple tables with some flags in a single table. This makes the code a bit shorter, and it should also make it easier to add other options to fields, e.g. regexp searching. --- lib/database-private.h | 24 ++ lib/database.cc| 87

[patch v5 4/6] lib: regexp matching in 'subject' and 'from'

2017-02-16 Thread David Bremner
the idea is that you can run % notmuch search subject:// % notmuch search from:// 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

[patch v5 2/6] lib: Let Xapian manage the memory for FieldProcessors

2017-02-16 Thread David Bremner
It turns out this is exactly what release() is for; Xapian will deallocate the objects when it's done with them. --- lib/database-private.h | 4 lib/database.cc| 19 --- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/lib/database-private.h

[patch v5 5/6] lib: add mid: as a synonym for id:

2017-02-16 Thread David Bremner
mid: is the url scheme suggested by URL 2392. We also plan to introduce more flexible searches for mid: than are possible with id: (in order not to break assumptions about the special behaviour of id:, e.g. identifying at most one message). --- lib/database.cc | 1 + test/T080-search.sh | 6

v5 of regexp searching

2017-02-16 Thread David Bremner
The first 3 patches are general cleanup of the way that the query parser is configured. [patch v5 1/6] lib: merge internal prefix tables [patch v5 2/6] lib: Let Xapian manage the memory for FieldProcessors [patch v5 3/6] lib: create field processors from prefix table This is

Re: notmuch version/Python bindings

2017-02-16 Thread Sebastian Spaeth
Hi there, I did stop using notmuch, true. Let me know if I should hand over administration or if I shouldnsimply delete the package on pypi. Sebastian -- Sent from my mobile phone. Please excuse brevity. Am 16. Februar 2017 18:00:33 MEZ schrieb David Bremner : >Aryeh Leib

Re: notmuch version/Python bindings

2017-02-16 Thread David Bremner
Aryeh Leib Taurog writes: > Okay, makes sense. Might I suggest a new release on pypi, then? I think Sebastian (listed as the pypi maintainer) somewhat lost interest in notmuch (since that version is 4 years old). I'm afraid I don't know anything about pypi, but I assume

Re: notmuch version/Python bindings

2017-02-16 Thread Aryeh Leib Taurog
Okay, makes sense. Might I suggest a new release on pypi, then? On Thu, Feb 16, 2017 at 10:24:16AM -0400, David Bremner wrote: > Aryeh Leib Taurog writes: > > > The latest notmuch includes libnotmuch.so.4.4.0 but the latest python > > bindings wrap libnotmuch.so.3 so

Re: notmuch version/Python bindings

2017-02-16 Thread David Bremner
Aryeh Leib Taurog writes: > The latest notmuch includes libnotmuch.so.4.4.0 but the latest python > bindings wrap libnotmuch.so.3 so importing from notmuch results in the > following error: > > File >

notmuch version/Python bindings

2017-02-16 Thread Aryeh Leib Taurog
The latest notmuch includes libnotmuch.so.4.4.0 but the latest python bindings wrap libnotmuch.so.3 so importing from notmuch results in the following error: File "/home/altaurog/venv/offlineimap/lib/python2.7/site-packages/notmuch/__init__.py", line 54, in from .database import