summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-04-23 16:39:18 -0700
committerCarl Worth <cworth@cworth.org>2010-04-23 16:39:18 -0700
commitb57d9635f50d5e9b53092218e81f6d2c391c363e (patch)
tree0182ca127e10cf6042a78658e7b892e0d1d640fa
parent45ad21fba18730cdf76725b8a132fc52ba4190a7 (diff)
emacs: Use single-quote not double-quote when constructing search
Commit 44982ab33295009137e3740e644e793a08629762 added some extra quoting when constructing a search. A previous version of this patch had used single-quotation marks (') while this version used double-quotation marks ("). The intent of the extra quoting was to allow notmuch-command to be set to a script invoking ssh. What actually happens, however is that the extra quotation marks make it all the way into the query string seen by Xapian. And the double quotes trigger phrase searching, (which isn't desired here). The side-effect of that is that the emacs code would fallback to an unqalified query and display all threads with all messages open. We fix that side-effect now by using single-quote characters, but we'll want a better fix in the future to avoid Xapian seeing these characters at all I think.
-rw-r--r--emacs/notmuch-show.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 53af301..55bab45 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -470,8 +470,8 @@ function is used. "
(save-excursion
(let* ((basic-args (list thread-id))
(args (if query-context
- (append (list "\"") basic-args (list "and (" query-context ")\""))
- (append (list "\"") basic-args (list "\"")))))
+ (append (list "\'") basic-args (list "and (" query-context ")\'"))
+ (append (list "\'") basic-args (list "\'")))))
(notmuch-show-insert-forest (notmuch-query-get-threads args))
;; If the query context reduced the results to nothing, run
;; the basic query.