From: Lars Magne Ingebrigtsen Date: Fri, 17 Sep 2010 22:33:31 +0000 (+0200) Subject: Don't use the "finish" method when we're reading from the agent. X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=3af643e143688ad167c7877a857413f9b47ce73c;p=gnus Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6b496e55..34b490bd8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2010-09-17 Lars Magne Ingebrigtsen + * gnus-start.el (gnus-read-active-for-groups): Don't use the "finish" + method when we're reading from the agent. + + * nnagent.el (nnagent-retrieve-group-data-early): New dummy method. + * auth-source.el (auth-sources): Add ~/.authinfo to the default, since that's probably most useful for users. diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 6aa0fa1bb..1d8093b7d 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1800,7 +1800,10 @@ If SCAN, request a scan of that group as well." (defun gnus-read-active-for-groups (method infos early-data) (with-current-buffer nntp-server-buffer (cond - ((gnus-check-backend-function 'finish-retrieve-group-infos (car method)) + ((and + (gnus-check-backend-function 'finish-retrieve-group-infos (car method)) + (or (not (gnus-agent-method-p method)) + (gnus-online method))) (gnus-finish-retrieve-group-infos method infos early-data)) ((gnus-check-backend-function 'retrieve-groups (car method)) (when (gnus-check-backend-function 'request-scan (car method)) diff --git a/lisp/nnagent.el b/lisp/nnagent.el index 263d721da..ccd4e890d 100644 --- a/lisp/nnagent.el +++ b/lisp/nnagent.el @@ -252,6 +252,9 @@ (nnoo-parent-function 'nnagent 'nnml-request-regenerate (list (nnagent-server server)))) +(deffoo nnagent-retrieve-group-data-early (server infos) + nil) + ;; Use nnml functions for just about everything. (nnoo-import nnagent (nnml)) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index c53b9db75..6274e2f37 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -575,7 +575,8 @@ not done by default on servers that doesn't support that command.") (completep (and start-article (= start-article 1)))) ;; First set the active ranges based on high/low. - (if completep + (if (or completep + (not (gnus-active group))) (gnus-set-active group (if high (cons low high)