emacs: Escape tag queries suggested by tab completion
authorAustin Clements <amdragon@MIT.EDU>
Fri, 26 Oct 2012 20:18:12 +0000 (16:18 -0400)
committerDavid Bremner <bremner@debian.org>
Sat, 27 Oct 2012 12:34:34 +0000 (09:34 -0300)
emacs/notmuch.el

index a8a85ce7839d11a9e5fce04d85da57481a51f45e..60e8bf957ca45da525e78b3e485ed8d2ace3fba9 100644 (file)
@@ -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