From: Austin Clements <amdragon@MIT.EDU>
Date: Fri, 26 Oct 2012 20:18:12 +0000 (-0400)
Subject: emacs: Escape tag queries suggested by tab completion
X-Git-Tag: 0.15_rc1~206
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=0a4663ff43c563ebe25234afb0ae012bc2c42959;p=notmuch

emacs: Escape tag queries suggested by tab completion
---

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index a8a85ce7..60e8bf95 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -917,7 +917,7 @@ PROMPT is the string to prompt with."
 	(append (list "folder:" "thread:" "id:" "date:" "from:" "to:"
 		      "subject:" "attachment:")
 		(mapcar (lambda (tag)
-			  (concat "tag:" tag))
+			  (concat "tag:" (notmuch-escape-boolean-term tag)))
 			(process-lines notmuch-command "search" "--output=tags" "*")))))
     (let ((keymap (copy-keymap minibuffer-local-map))
 	  (minibuffer-completion-table