From: Kevin Greiner Date: Thu, 9 Jan 2003 07:55:39 +0000 (+0000) Subject: * gnus-agent.el (gnus-agent-catchup): Do not mark cached nor X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=fe71477d8568819c3b681b13f6793e5bf51e7184;p=gnus * 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. --- diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 6ca903424..f263901d4 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -770,23 +770,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)