diff options
author | Gnus developers <ding@gnus.org> | 2012-01-04 10:49:38 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2012-01-04 10:49:38 +0000 |
commit | 7e67562fca9c1ca1b6e565c4b440984213629809 (patch) | |
tree | 81d6f225f3d6a1499b24d03bb87f7fba19e4a469 /lisp/gnus/nntp.el | |
parent | b900cf87161313a1ab11981a3a27367df80ca7cb (diff) | |
download | emacs-7e67562fca9c1ca1b6e565c4b440984213629809.tar.gz emacs-7e67562fca9c1ca1b6e565c4b440984213629809.tar.bz2 emacs-7e67562fca9c1ca1b6e565c4b440984213629809.zip |
Merge changes made in Gnus trunk.
2012-01-04 Julien Danjou <julien@danjou.info>
* nnimap.el (nnimap-update-info): Fix an error when all articles UIDs
change.
2012-01-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
* shr.el (shr-rescale-image): Add :ascent 100 to the rescaled picture,
too.
* nntp.el (nntp-retrieve-group-data-early): Use it.
2012-01-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nntp.el (nntp-retrieval-in-progress): New variable.
(nntp-make-process-buffer): Make it buffer-local.
* gnus-demon.el (gnus-demon-time-to-step): Resurrect function lost in
2010.
(gnus-demon-init): Use it to compute the time if time is on the form
"04:23".
* gnus-topic.el (gnus-topic-history): Define `gnus-topic-history'.
* nnimap.el (nnimap-finish-retrieve-group-infos): Check the connection
status in the correct buffer.
2012-01-03 Leo <sdl.web@gmail.com>
* gnus-topic.el (gnus-topic-goto-next-group): Don't move point around
when opening topics (bug#10407).
Diffstat (limited to 'lisp/gnus/nntp.el')
-rw-r--r-- | lisp/gnus/nntp.el | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index f4b8ce66d16..e089dfbe106 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1,6 +1,6 @@ ;;; nntp.el --- nntp access for Gnus -;; Copyright (C) 1987-1990, 1992-1998, 2000-2011 +;; Copyright (C) 1987-1990, 1992-1998, 2000-2012 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -281,6 +281,7 @@ update their active files often, this can help.") ;;; Internal variables. +(defvoo nntp-retrieval-in-progress nil) (defvar nntp-record-commands nil "*If non-nil, nntp will record all commands in the \"*nntp-log*\" buffer.") @@ -770,21 +771,28 @@ command whose response triggered the error." (deffoo nntp-retrieve-group-data-early (server infos) "Retrieve group info on INFOS." (nntp-with-open-group nil server - (when (nntp-find-connection-buffer nntp-server-buffer) - ;; The first time this is run, this variable is `try'. So we - ;; try. - (when (eq nntp-server-list-active-group 'try) - (nntp-try-list-active - (gnus-group-real-name (gnus-info-group (car infos))))) - (with-current-buffer (nntp-find-connection-buffer nntp-server-buffer) - (erase-buffer) - (let ((nntp-inhibit-erase t) - (command (if nntp-server-list-active-group - "LIST ACTIVE" "GROUP"))) - (dolist (info infos) - (nntp-send-command - nil command (gnus-group-real-name (gnus-info-group info))))) - (length infos))))) + (let ((buffer (nntp-find-connection-buffer nntp-server-buffer))) + (when (and buffer + (with-current-buffer buffer + (not nntp-retrieval-in-progress))) + ;; The first time this is run, this variable is `try'. So we + ;; try. + (when (eq nntp-server-list-active-group 'try) + (nntp-try-list-active + (gnus-group-real-name (gnus-info-group (car infos))))) + (with-current-buffer buffer + (erase-buffer) + ;; Mark this buffer as "in use" in case we try to issue two + ;; retrievals from the same server. This shouldn't happen, + ;; so this is mostly a sanity check. + (setq nntp-retrieval-in-progress t) + (let ((nntp-inhibit-erase t) + (command (if nntp-server-list-active-group + "LIST ACTIVE" "GROUP"))) + (dolist (info infos) + (nntp-send-command + nil command (gnus-group-real-name (gnus-info-group info))))) + (length infos)))))) (deffoo nntp-finish-retrieve-group-infos (server infos count) (nntp-with-open-group nil server @@ -794,6 +802,8 @@ command whose response triggered the error." (car infos))) (received 0) (last-point 1)) + (with-current-buffer buf + (setq nntp-retrieval-in-progress nil)) (when (and buf count) (with-current-buffer buf @@ -1318,6 +1328,7 @@ password contained in '~/.nntp-authinfo'." (set (make-local-variable 'nntp-process-to-buffer) nil) (set (make-local-variable 'nntp-process-start-point) nil) (set (make-local-variable 'nntp-process-decode) nil) + (set (make-local-variable 'nntp-retrieval-in-progress) nil) (current-buffer))) (defun nntp-open-connection (buffer) |