diff --git a/bindings/python/notmuch/version.py b/bindings/python/notmuch/version.py index 903dbb04..bfdcf7ed 100644 --- a/bindings/python/notmuch/version.py +++ b/bindings/python/notmuch/version.py @@ -1,3 +1,3 @@ # this file should be kept in sync with ../../../version -__VERSION__ = '0.24' +__VERSION__ = '0.24.1' SOVERSION = '5' diff --git a/debian/changelog b/debian/changelog index 520a1e7a..9dc3b608 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +notmuch (0.24.1-1) UNRELEASED; urgency=medium + + * Restore Xapian wildcard queries to from: and subject: + + -- David Bremner Sat, 25 Mar 2017 11:21:34 -0300 + notmuch (0.24-1) experimental; urgency=medium * New upstream release diff --git a/lib/regexp-fields.cc b/lib/regexp-fields.cc index 8e740a81..9dcf9732 100644 --- a/lib/regexp-fields.cc +++ b/lib/regexp-fields.cc @@ -158,8 +158,14 @@ RegexpFieldProcessor::operator() (const std::string & str) } else { /* TODO replace this with a nicer API level triggering of * phrase parsing, when possible */ - std::string quoted='"' + str + '"'; - return parser.parse_query (quoted, NOTMUCH_QUERY_PARSER_FLAGS, term_prefix); + std::string query_str; + + if (str.find (' ') != std::string::npos) + query_str = '"' + str + '"'; + else + query_str = str; + + return parser.parse_query (query_str, NOTMUCH_QUERY_PARSER_FLAGS, term_prefix); } } #endif diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh index df48ab82..61739e87 100755 --- a/test/T650-regexp-query.sh +++ b/test/T650-regexp-query.sh @@ -11,6 +11,13 @@ fi notmuch search --output=messages from:cworth > cworth.msg-ids +test_begin_subtest "xapian wildcard search for from:" +notmuch search --output=messages 'from:cwo*' > OUTPUT +test_expect_equal_file cworth.msg-ids OUTPUT + +test_begin_subtest "xapian wildcard search for subject:" +test_expect_equal $(notmuch count 'subject:count*') 1 + test_begin_subtest "regexp from search, case sensitive" notmuch search --output=messages from:/carl/ > OUTPUT test_expect_equal_file /dev/null OUTPUT diff --git a/version b/version index fd137eb1..48b91fd8 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.24 +0.24.1