X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=inline;f=emacs%2Fnotmuch-lib.el;h=959764e33c98a0487a6d401ebfb7ebecd7881241;hb=2a79d81211664ca3f0cd1a847795d48bd66b8a3d;hp=fa7646fecb8bb020c2b06cea1fb5579be19c49f4;hpb=dfab8e5e49d90c415f9585a02a2b0d6f72b4083a;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)))