<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/regexp-fields.cc, branch 0.29_rc0</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.29_rc0</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.29_rc0'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2019-03-28T17:34:37Z</updated>
<entry>
<title>lib: use phrase search for anything not ending in '*'</title>
<updated>2019-03-28T17:34:37Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2018-09-30T16:27:55Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d25dcc589ce4c1a87d698c6aef1ce3e38e4a50bb'/>
<id>urn:sha1:d25dcc589ce4c1a87d698c6aef1ce3e38e4a50bb</id>
<content type='text'>
Anything that does not look like a wildcard should be safe to
quote. This should fix the problem searching for xapian keywords.
</content>
</entry>
<entry>
<title>Prepend regerror() messages with "regexp error: "</title>
<updated>2019-03-12T01:24:55Z</updated>
<author>
<name>Luis Ressel</name>
<email>aranea@aixah.de</email>
</author>
<published>2019-03-11T17:14:49Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9f7e851263b96acacc9ea542e9f5d837563fea05'/>
<id>urn:sha1:9f7e851263b96acacc9ea542e9f5d837563fea05</id>
<content type='text'>
The exact error messages returned by regerror() aren't standardized;
relying on them isn't portable. Thus, add a a prefix to make clear that
the subsequent message is a regexp parsing error, and only look for this
prefix in the test suite, ignoring the rest of the message.
</content>
</entry>
<entry>
<title>lib: Add regexp expansion for for tags and paths</title>
<updated>2017-05-09T10:44:29Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-03-08T02:32:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=11d47950c18f2d19718e35b7264dabf2ff2fd621'/>
<id>urn:sha1:11d47950c18f2d19718e35b7264dabf2ff2fd621</id>
<content type='text'>
From a UI perspective this looks similar to what was already provided
for from, subject, and mid, but the implementation is quite
different. It uses the database's list of terms to construct a term
based query equivalent to the passed regular expression.
</content>
</entry>
<entry>
<title>lib: Add regexp searching for mid: prefix</title>
<updated>2017-05-09T10:44:15Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-02-15T12:58:28Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=eab365c742f86b52729ec2a5acaba1a798f94661'/>
<id>urn:sha1:eab365c742f86b52729ec2a5acaba1a798f94661</id>
<content type='text'>
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).
</content>
</entry>
<entry>
<title>lib: handle empty string in regexp field processors</title>
<updated>2017-03-29T23:44:32Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-03-24T22:52:51Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=cb84f8487833c19ce13edb769fa6421547077725'/>
<id>urn:sha1:cb84f8487833c19ce13edb769fa6421547077725</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>lib: only trigger phrase processing for regexp fields when needed</title>
<updated>2017-03-24T12:24:13Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-03-18T02:23:51Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=38a56b98f9b282decc5edbe1da9717e3b2bdb6b2'/>
<id>urn:sha1:38a56b98f9b282decc5edbe1da9717e3b2bdb6b2</id>
<content type='text'>
The argument is that if the string passed to the field processor has
no spaces, then the added quotes won't have any benefit except for
disabling wildcards. But disabling wildcards doesn't seem very useful
in the normal Xapian query parser, since they're stripped before
generating terms anyway. It does mean that the query 'from:"foo*"' will
not be precisely equivalent to 'from:foo' as it is for the non
field-processor version.
</content>
</entry>
<entry>
<title>lib: Fix RegexpPostingSource</title>
<updated>2017-03-07T23:44:36Z</updated>
<author>
<name>Olly Betts</name>
<email>olly@survex.com</email>
</author>
<published>2017-03-07T12:52:39Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=81bd72cebbffcc11be4198a099974a0e0722c86e'/>
<id>urn:sha1:81bd72cebbffcc11be4198a099974a0e0722c86e</id>
<content type='text'>
Remove incorrect skipping to first match from init(), and add explicit
skip_to() and check() methods to work around xapian-core bug (the
check() method will also improve speed when filtering by one of
these).
</content>
</entry>
<entry>
<title>lib: use delete[] to free buffer allocated using new[]</title>
<updated>2017-03-05T00:42:39Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-03-04T17:38:41Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f3edc5dc86a2d819ae92998ccfc5ac507dbbc5b0'/>
<id>urn:sha1:f3edc5dc86a2d819ae92998ccfc5ac507dbbc5b0</id>
<content type='text'>
Fix warning caught by clang:

lib/regexp-fields.cc:41:2: warning: 'delete' applied to a pointer that was allocated
      with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        delete buffer;
        ^
              []
lib/regexp-fields.cc:37:17: note: allocated with 'new[]' here
        char *buffer = new char[len];
                       ^
</content>
</entry>
<entry>
<title>lib: regexp matching in 'subject' and 'from'</title>
<updated>2017-03-03T21:46:48Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-02-27T02:34:20Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=55524bb063c95ae51a1762eb0b1aacce6ca49223'/>
<id>urn:sha1:55524bb063c95ae51a1762eb0b1aacce6ca49223</id>
<content type='text'>
the idea is that you can run

% notmuch search subject:/&lt;your-favourite-regexp&gt;/
% notmuch search from:/&lt;your-favourite-regexp&gt;/

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.
</content>
</entry>
</feed>
