+2002-01-09 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * 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 <jas@extundo.com>
* message.el (message-tool-bar-map): Add preview.
(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)
(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
;; 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 ()