diff options
author | Eric Abrahamsen <eric@ericabrahamsen.net> | 2020-12-20 11:26:37 -0800 |
---|---|---|
committer | Eric Abrahamsen <eric@ericabrahamsen.net> | 2020-12-22 09:01:25 -0800 |
commit | aae44a36f35cc8bdefe86daf78fb9aa03df72c3a (patch) | |
tree | f4771d97c2b0203c4642cfdccf714cabb135c640 /lisp/gnus/gnus-search.el | |
parent | 9449b81f2761661f1e3a9187906c00f95b6f6ebd (diff) | |
download | emacs-aae44a36f35cc8bdefe86daf78fb9aa03df72c3a.tar.gz emacs-aae44a36f35cc8bdefe86daf78fb9aa03df72c3a.tar.bz2 emacs-aae44a36f35cc8bdefe86daf78fb9aa03df72c3a.zip |
Ensure that Gnus servers are open(able) before searching them
* lisp/gnus/gnus-search.el (gnus-search-run-search): Imap servers need
to be opened (made into the "current server") before we manipulate the
nnimap-buffer.
(gnus-search-run-search): Sneakily fix regexp.
(gnus-search-indexed-parse-output): We need to pass the server name in
here, otherwise nnmaildir won't know how to make this the "current
server".
Diffstat (limited to 'lisp/gnus/gnus-search.el')
-rw-r--r-- | lisp/gnus/gnus-search.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 16f3a024aa6..3a3722c90a3 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -1050,6 +1050,7 @@ Responsible for handling and, or, and parenthetical expressions.") (grouplist (or groups (gnus-search-get-active srv))) q-string artlist group) (message "Opening server %s" server) + (gnus-open-server srv) ;; We should only be doing this once, in ;; `nnimap-open-connection', but it's too frustrating to try to ;; get to the server from the process buffer. @@ -1071,7 +1072,7 @@ 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) + (unless (and (string-match "\\`[^[:blank:]]+" q-string) (memql (intern-soft (downcase (match-string 0 q-string))) gnus-search-imap-search-keys)) @@ -1424,7 +1425,7 @@ Returns a list of [group article score] vectors." (string-to-number article) (nnmaildir-base-name-to-article-number (substring article 0 (string-match ":" article)) - group nil)) + group (string-remove-prefix "nnmaildir:" server))) (if (numberp score) score (string-to-number score))) |