summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-search.el
diff options
context:
space:
mode:
authorEric Abrahamsen <eric@ericabrahamsen.net>2022-05-06 10:14:08 -0700
committerEric Abrahamsen <eric@ericabrahamsen.net>2022-05-06 10:15:51 -0700
commitc57a6644ef97b3197c35c0c3ade60acd5607eef4 (patch)
treed43e319c1a1fc72814b0f84841ef9d61c7f2b567 /lisp/gnus/gnus-search.el
parentb7e1176323386935e34dbc98ec7d445c728cc83a (diff)
downloademacs-c57a6644ef97b3197c35c0c3ade60acd5607eef4.tar.gz
Fix handling of IMAP search strings
* lisp/gnus/gnus-search.el (gnus-search-imap-handle-string): This was a misunderstanding of what `multibyte-string-p' means. The check was actually supposed to be whether the string was non-ascii or not.
Diffstat (limited to 'lisp/gnus/gnus-search.el')
-rw-r--r--lisp/gnus/gnus-search.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 17724c3a514..369df81d9bd 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1337,7 +1337,11 @@ elements are present."
(cl-defmethod gnus-search-imap-handle-string ((engine gnus-search-imap)
(str string))
(with-slots (literal-plus) engine
- (if (multibyte-string-p str)
+ ;; TODO: Figure out how Exchange IMAP servers actually work. They
+ ;; do not accept any CHARSET but US-ASCII, but they do report
+ ;; Literal+ capability. So what do we do? Will quoted strings
+ ;; always work?
+ (if (string-match-p "[^[:ascii:]]" str)
;; If LITERAL+ is available, use it and encode string as
;; UTF-8.
(if literal-plus