[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/gnus-search 7d34930 3/4: Fix to 7f21251a56, don't
From: |
Eric Abrahamsen |
Subject: |
[Emacs-diffs] scratch/gnus-search 7d34930 3/4: Fix to 7f21251a56, don't parse address key |
Date: |
Sat, 10 Jun 2017 00:32:05 -0400 (EDT) |
branch: scratch/gnus-search
commit 7d3493078507412fa17377bd6b9093414b33335d
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
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 e799374..62af674 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.