[PATCH 4/9] cli/config: check syntax of user configured field names

2019-03-27 Thread David Bremner
These restrictions are meant to prevent incompatibilities with the Xapian query parser (which will split at non-word characters) and clashes with future notmuch builtin fields. --- notmuch-config.c | 41 +++- test/T730-user-header.sh | 30

[PATCH 3/9] cli/config: support user header index config

2019-03-27 Thread David Bremner
We don't do anything with this configuration information information yet, but nonetheless add a couple of regression tests to make sure we don't break standard functionality when we do use the configuration information. --- notmuch-config.c | 1 + test/T730-user-header.sh | 43

[PATCH 1/9] util: add unicode_word_utf8

2019-03-27 Thread David Bremner
This originally use Xapian::Unicode::is_wordchar, but that forces clients to link directly to libxapian, which seems like it might be busywork if nothing else. --- util/Makefile.local | 3 ++- util/unicode-util.c | 45 + util/unicode-util.h | 12

[PATCH 8/9] lib/database: index user headers.

2019-03-27 Thread David Bremner
There is a O(log(#user headers)) penalty for the second lookup of the prefix name. --- lib/database.cc | 6 ++ lib/index.cc | 28 lib/notmuch-private.h| 5 + test/T730-user-header.sh | 17 + 4 files changed, 56

[PATCH 7/9] lib: support user prefix names in term generation

2019-03-27 Thread David Bremner
This should not change the indexing process yet as nothing calls _notmuch_message_gen_terms with a user prefix name. On the other hand, it should not break anything either. --- lib/database.cc | 20 lib/message.cc| 5 - lib/notmuch-private.h | 1 + 3 files

Index user defined headers

2019-03-27 Thread David Bremner
This obsoletes [1]. Compared to the previous version the main change is that it imposes the restriction that user defined prefixes may not start with [a-z], and must consist of "unicode word characters". This assumes a utf8 input encoding. People that don't like utf8 are welcome to use ASCII :P

[PATCH 2/9] cli/config: refactor _stored_in_db

2019-03-27 Thread David Bremner
This will make it easier to add other prefixes that are stored in the database, compared to special casing each one as "query." was. --- notmuch-config.c | 47 +-- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/notmuch-config.c

[PATCH 5/9] lib: setup user headers in query parser

2019-03-27 Thread David Bremner
These tests will need to be updated if the Xapian query print/debug format changes. --- lib/database.cc | 35 +++ test/T730-user-header.sh | 21 + 2 files changed, 56 insertions(+) diff --git a/lib/database.cc b/lib/database.cc index

[PATCH 9/9] doc: document user header indexing.

2019-03-27 Thread David Bremner
It's a bit odd that the primary documentation is in notmuch-config, but it is consistent with the "query:" prefix. --- doc/man1/notmuch-config.rst | 9 + doc/man7/notmuch-search-terms.rst | 3 +++ 2 files changed, 12 insertions(+) diff --git a/doc/man1/notmuch-config.rst

[PATCH 6/9] lib: cache user prefixes in database object

2019-03-27 Thread David Bremner
This will be used to avoid needing a database access to resolve a db prefix from the corresponding UI prefix (e.g. when indexing). Arguably the setup of the seperate header map does not belong here, since it is about indexing rather than querying, but we currently don't have any other indexing

Re: [PATCH] doc: Clean up warnings when building notmuch-emacs docs

2019-03-27 Thread David Bremner
Daniel Kahn Gillmor writes: > Without this change, we see this during the build: > > sphinx-build -b html -d doc/_build/doctrees -q ./doc doc/_build/html > …/doc/notmuch-emacs.rst:67: WARNING: Unexpected indentation. > …/doc/notmuch-emacs.rst:165: WARNING: Unexpected indentation. >

Re: [PATCH v2 1/3] build: ensure that SHA256_FILE is built

2019-03-27 Thread David Bremner
Daniel Kahn Gillmor writes: > The SHA256_FILE used to be built automatically because of the makefile > dependencies. > > Since b8a8dbed91d16299a8768646fb6f18181f31ec40, it isn't getting made > properly, so the release target would fail. Pushed these 3 patches to master. d

Re: [PATCH 2/2] release: use xz compression

2019-03-27 Thread David Bremner
David Bremner writes: > This produces tarballs that are roughly 30% smaller. pushed to master. People building snapshots may need to adjust their machinery. d ___ notmuch mailing list notmuch@notmuchmail.org