From: yamaoka Date: Thu, 9 Jan 2003 07:59:38 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_12-00-quimby~17 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d01295d8a91b9b7b05dbf2a72ed132f9650d7cb2;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7cadfaa..478014a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2002-01-09 Kevin Greiner + + * gnus-agent.el (gnus-agent-catchup): Do not mark cached nor + processable articles as read. + (gnus-agent-summary-fetch-series): Remove processable and + downloadable marks on all downloaded articles in the series. + + * nntp.el (nntp-report): Throw error after reporting the problem. + (nntp-accept-process-output): Corrected error check to report an + error when the process is nil. + 2003-01-09 Simon Josefsson * message.el (message-tool-bar-map): Add preview. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index e7cc6ea..c021c3a 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -785,23 +785,36 @@ article's mark is toggled." (setq gnus-newsgroup-undownloaded (cdr undownloaded)))))) (defun gnus-agent-catchup () - "Mark all undownloaded articles as read." + "Mark all articles as read that are neither cached, downloaded, nor downloadable." (interactive) (save-excursion - (while gnus-newsgroup-undownloaded - (gnus-summary-mark-article - (pop gnus-newsgroup-undownloaded) gnus-catchup-mark))) - (gnus-summary-position-point)) + (let ((articles gnus-newsgroup-undownloaded)) + (when (or gnus-newsgroup-downloadable + gnus-newsgroup-cached) + (setq articles (gnus-sorted-ndifference (gnus-sorted-ndifference (copy-sequence articles) gnus-newsgroup-downloadable) gnus-newsgroup-cached))) + + (while articles + (gnus-summary-mark-article + (pop articles) gnus-catchup-mark))) + (gnus-summary-position-point))) (defun gnus-agent-summary-fetch-series () (interactive) (when gnus-newsgroup-processable (setq gnus-newsgroup-downloadable (let* ((dl gnus-newsgroup-downloadable) - (gnus-newsgroup-downloadable (sort gnus-newsgroup-processable '<)) + (gnus-newsgroup-downloadable (sort (copy-sequence gnus-newsgroup-processable) '<)) (fetched-articles (gnus-agent-summary-fetch-group))) - (dolist (article fetched-articles) - (gnus-summary-remove-process-mark article)) + ;; The preceeding call to (gnus-agent-summary-fetch-group) + ;; updated gnus-newsgroup-downloadable to remove each + ;; article successfully fetched. + + ;; For each article that I processed, remove its + ;; processable mark IF the article is no longer + ;; downloadable (i.e. it's already downloaded) + (dolist (article gnus-newsgroup-processable) + (unless (memq article gnus-newsgroup-downloadable) + (gnus-summary-remove-process-mark article))) (gnus-sorted-ndifference dl fetched-articles))))) (defun gnus-agent-summary-fetch-group (&optional all) diff --git a/lisp/nntp.el b/lisp/nntp.el index 773b31e..fb329d8 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -316,7 +316,9 @@ retried once before actually displaying the error report." (when nntp-record-commands (nntp-record-command "*** CALLED nntp-report ***")) - (nnheader-report 'nntp args)) + (nnheader-report 'nntp args) + + (apply 'error args)) (defun nntp-report-1 (&rest args) "Throws out to nntp-with-open-group-error so that the connection may @@ -1350,8 +1352,8 @@ password contained in '~/.nntp-authinfo'." ;; that the server has closed the connection. This MUST be ;; handled here as the buffer restored by the save-excursion may ;; be the process's former output buffer (i.e. now killed) - (or (not process) - (memq (process-status process) '(open run)) + (or (and process + (memq (process-status process) '(open run))) (nntp-report "Server closed connection")))) (defun nntp-accept-response ()