Commit fcf8ad61 authored by Eric Abrahamsen's avatar Eric Abrahamsen

Fix possible prepending of "TEXT" to IMAP searches

* lisp/gnus/gnus-search.el (gnus-search-imap-search-keys): Add missing
keys "old", "new", "or" and "not".
(gnus-search-run-search): In addition, don't touch the query if it
starts with a parenthesis. Consider just getting rid of this
convenience altogether.
parent 1aa36d96
Pipeline #8639 failed with stage
in 55 minutes and 14 seconds
......@@ -1036,7 +1036,7 @@ Responsible for handling and, or, and parenthetical expressions.")
'(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 old new or not)
"Known IMAP search keys.")
;; imap interface
......@@ -1072,10 +1072,11 @@ Responsible for handling and, or, and parenthetical expressions.")
;; 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)
(memql (intern-soft (downcase
(match-string 0 q-string)))
(unless (or (looking-at "(")
(and (string-match "\\`[^[:blank:]]+" q-string)
(memql (intern-soft (downcase
(match-string 0 q-string)))
(setq q-string (concat "TEXT " q-string)))
;; If it's a thread query, make sure that all message-id
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment