Another regexp search fix.
+Notmuch 0.24.1 (UNRELEASED)
+===========================
+
+General
+-------
+
+Fix regressions in non-regexp search for `from:` and `subject:`.
+
+ The regexp search code in 0.24 introduced a regression in the
+ handling of empty queries and wildcards. These are both corrected in
+ this release.
+
+Command Line Interface
+----------------------
+
+Fix several memory leaks in `notmuch show`.
+
+Update NEWS for 0.24 to mention schema changes.
+
+Library Changes
+---------------
+
+Fix a read-after-free in the library.
+
Notmuch 0.24 (2017-03-12)
=========================
have notmuch run them as if they were notmuch commands. See the
`notmuch(1)` man page for details
+New default output format to 3
+
+ See devel/schemata for details. Users of the structured output
+ format are reminded of the `--format-version` argument to `notmuch
+ show` and `notmuch search` which can prevent breakage when the
+ default format changes.
+
Emacs
-----
Xapian::Query
RegexpFieldProcessor::operator() (const std::string & str)
{
+ if (str.size () == 0)
+ return Xapian::Query(Xapian::Query::OP_AND_NOT,
+ Xapian::Query::MatchAll,
+ Xapian::Query (Xapian::Query::OP_WILDCARD, term_prefix));
+
if (str.at (0) == '/') {
if (str.at (str.size () - 1) == '/'){
RegexpPostingSource *postings = new RegexpPostingSource (slot, str.substr(1,str.size () - 2));
notmuch search --output=messages from:cworth > cworth.msg-ids
+# these headers will generate no document terms
+add_message '[from]="-" [subject]="empty from"'
+add_message '[subject]="-"'
+
+test_begin_subtest "null from: search"
+notmuch search 'from:""' | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX 2001-01-05 [1/1] -; empty from (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "null subject: search"
+notmuch search 'subject:""' | notmuch_search_sanitize > OUTPUT
+cat <<EOF > EXPECTED
+thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; - (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
test_begin_subtest "xapian wildcard search for from:"
notmuch search --output=messages 'from:cwo*' > OUTPUT
test_expect_equal_file cworth.msg-ids OUTPUT