X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=emacs%2Fnotmuch-lib.el;h=959764e33c98a0487a6d401ebfb7ebecd7881241;hb=92c3fd938e7a4e86edbc872eb5348dc048ec0e78;hp=fa7646fecb8bb020c2b06cea1fb5579be19c49f4;hpb=716af7deb8d0692ec3c867a599e29da61027b808;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index fa7646fe..959764e3 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -426,7 +426,10 @@ user-friendly queries." (save-match-data (if (or (equal term "") - (string-match "[ ()]\\|^\"" term)) + ;; To be pessimistic, only pass through terms composed + ;; entirely of ASCII printing characters other than ", (, + ;; and ). + (string-match "[^!#-'*-~]" term)) ;; Requires escaping (concat "\"" (replace-regexp-in-string "\"" "\"\"" term t t) "\"") term)))