diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 44f43b073c..f20f9586d2 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -1036,7 +1036,7 @@ gnus-search-imap-search-keys '(body cc bcc from header keyword larger smaller subject text to uid x-gm-raw answered before deleted draft flagged on since recent seen sentbefore senton sentsince unanswered undeleted undraft unflagged unkeyword - unseen all) + unseen all new not old or) "Known IMAP search keys.") ;; imap interface @@ -1072,9 +1072,9 @@ gnus-search-imap-search-keys ;; A bit of backward-compatibility slash convenience: if the ;; query string doesn't start with any known IMAP search ;; keyword, assume it is a "TEXT" search. - (unless (and (string-match "\\`[^[:blank:]]+" q-string) + (unless (and (string-match "\\`(*\\([^[:blank:]]+\\)" q-string) (memql (intern-soft (downcase - (match-string 0 q-string))) + (match-string 1 q-string))) gnus-search-imap-search-keys)) (setq q-string (concat "TEXT " q-string)))