From 964646c45ae912f82520e858588d2dc0f7ff1864 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 27 Jan 2012 14:32:25 +0000 Subject: [PATCH] Merge changes made in Gnus trunk gnus-start.el (gnus-get-unread-articles): Clear out "early" methods so that previous errors don't prohibit getting new news. nnimap.el (nnimap-retrieve-group-data-early): Ditto. nntp.el (nntp-retrieve-group-data-early): Ditto. --- lisp/gnus/ChangeLog | 9 +++++++++ lisp/gnus/gnus-start.el | 15 +++++++++++++++ lisp/gnus/nnimap.el | 3 ++- lisp/gnus/nntp.el | 4 ++++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 94c5fba8731..875ab494f2f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,12 @@ +2012-01-27 Lars Ingebrigtsen + + * gnus-start.el (gnus-get-unread-articles): Clear out "early" methods + so that previous errors don't prohibit getting new news. + + * nnimap.el (nnimap-retrieve-group-data-early): Ditto. + + * nntp.el (nntp-retrieve-group-data-early): Ditto. + 2012-01-26 Katsumi Yamaoka * gnus-sum.el (gnus-summary-mode): Don't make bidi-paragraph-direction diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 07409162ab8..9b1d5681e6c 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1714,6 +1714,21 @@ backend check whether the group actually exists." (with-current-buffer nntp-server-buffer (gnus-read-active-file-1 method nil))))) + ;; Clear out all the early methods. + (dolist (elem type-cache) + (destructuring-bind (method method-type infos dummy) elem + (when (and method + infos + (gnus-check-backend-function + 'retrieve-group-data-early (car method)) + (not (gnus-method-denied-p method))) + (when (ignore-errors (gnus-get-function method 'open-server)) + (unless (gnus-server-opened method) + (gnus-open-server method)) + (when (gnus-server-opened method) + ;; Just mark this server as "cleared". + (gnus-retrieve-group-data-early method nil)))))) + ;; Start early async retrieval of data. (let ((done-methods nil) sanity-spec) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 0df7ffce671..afa4bdf3dbd 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1213,7 +1213,8 @@ textual parts.") t))) (deffoo nnimap-retrieve-group-data-early (server infos) - (when (nnimap-possibly-change-group nil server) + (when (and (nnimap-possibly-change-group nil server) + infos) (with-current-buffer (nnimap-buffer) (erase-buffer) (setf (nnimap-group nnimap-object) nil) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index c740f614356..7148fdbb216 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -772,7 +772,11 @@ command whose response triggered the error." "Retrieve group info on INFOS." (nntp-with-open-group nil server (let ((buffer (nntp-find-connection-buffer nntp-server-buffer))) + (unless infos + (with-current-buffer buffer + (setq nntp-retrieval-in-progress nil))) (when (and buffer + infos (with-current-buffer buffer (not nntp-retrieval-in-progress))) ;; The first time this is run, this variable is `try'. So we -- 2.39.2