From 7d3493078507412fa17377bd6b9093414b33335d Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sun, 4 Jun 2017 09:47:35 +0800 Subject: [PATCH] Fix to 7f21251a56, don't parse address key * lisp/gnus/gnus-search.el (gnus-search-transform-expression): There's no need to parenthesize those expressions. Nested parentheses actually raise a parsing error, which is another bug. --- lisp/gnus/gnus-search.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index e799374553c..62af6749729 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -748,6 +748,9 @@ character, and return everything between point and the next occurance of the delimiter, including the delimiters themselves. If TRIM is non-nil, do not return the delimiters. Otherwise, return one word." + ;; This function cannot handle nested delimiters, as it's not a + ;; proper parser. Ie, you cannot parse "to:bob or (from:bob or + ;; (cc:bob or bcc:bob))". (let ((start (point)) (delimiter (if (stringp delimited) delimited @@ -1296,13 +1299,13 @@ boolean instead." (gnus-search-transform engine (gnus-search-parse-query (format - "to:%s or (cc:%s or bcc:%s)" + "to:%s or cc:%s or bcc:%s" (cdr expr) (cdr expr) (cdr expr))))) ((eq (car expr) 'address) (gnus-search-transform engine (gnus-search-parse-query (format - "from:%s or (to:%s or (cc:%s or bcc:%s))" + "from:%s or to:%s or cc:%s or bcc:%s" (cdr expr) (cdr expr) (cdr expr) (cdr expr))))) ((memq (car expr) '(before since on sentbefore senton sentsince)) ;; Ignore dates given as strings. -- 2.39.5