aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2017-03-25 11:51:03 -0300
committerDavid Bremner <david@tethera.net>2017-03-25 11:51:03 -0300
commitd877240f4e097eb3dd477409a24155c10e0b3c17 (patch)
tree4cfe273e80176afaba0b799d4398e18915a1311f
parent9b7dbed58ebd3aeee16b044fdffda6b39e90643e (diff)
parentbf84665cc01b50ce80cf1df369db6a6c1ff523dd (diff)
Merge branch 'release'
wildcard search fixes, plus release busywork
-rw-r--r--bindings/python/notmuch/version.py2
-rw-r--r--debian/changelog6
-rw-r--r--lib/regexp-fields.cc10
-rwxr-xr-xtest/T650-regexp-query.sh7
-rw-r--r--version2
5 files changed, 23 insertions, 4 deletions
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 <bremner@debian.org> 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