Function: gnus-summary-catchup
gnus-summary-catchup is an interactive and byte-compiled function
defined in gnus-sum.el.gz.
Signature
(gnus-summary-catchup &optional ALL QUIETLY TO-HERE NOT-MARK REVERSE)
Documentation
Mark all unread articles in this newsgroup as read.
If prefix argument ALL is non-nil, ticked and dormant articles will also be marked as read. If QUIETLY is non-nil, no questions will be asked.
If TO-HERE is non-nil, it should be a point in the buffer. All articles before (after, if REVERSE is set) this point will be marked as read.
Note that this function will only catch up the unread article in the current summary buffer limitation.
The number of articles marked as read is returned.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-catchup (&optional all quietly to-here not-mark reverse)
"Mark all unread articles in this newsgroup as read.
If prefix argument ALL is non-nil, ticked and dormant articles will
also be marked as read.
If QUIETLY is non-nil, no questions will be asked.
If TO-HERE is non-nil, it should be a point in the buffer. All
articles before (after, if REVERSE is set) this point will be marked
as read.
Note that this function will only catch up the unread article
in the current summary buffer limitation.
The number of articles marked as read is returned."
(interactive "P" gnus-summary-mode)
(prog1
(save-excursion
(when (or quietly
(not gnus-interactive-catchup) ;Without confirmation?
gnus-expert-user
(gnus-y-or-n-p
(if all
"Mark absolutely all articles as read? "
"Mark all unread articles as read? ")))
(if (and not-mark
(not gnus-newsgroup-adaptive)
(not gnus-newsgroup-auto-expire)
(not gnus-suppress-duplicates)
(or (not gnus-use-cache)
(eq gnus-use-cache 'passive)))
(progn
(when all
(setq gnus-newsgroup-marked nil
gnus-newsgroup-spam-marked nil
gnus-newsgroup-dormant nil))
(setq gnus-newsgroup-unreads
(gnus-sorted-nunion
(gnus-sorted-intersection gnus-newsgroup-unreads
gnus-newsgroup-downloadable)
(gnus-sorted-difference gnus-newsgroup-unfetched
gnus-newsgroup-cached))))
;; We actually mark all articles as canceled, which we
;; have to do when using auto-expiry or adaptive scoring.
(gnus-summary-show-all-threads)
(if (and to-here reverse)
(progn
(goto-char to-here)
(gnus-summary-mark-current-read-and-unread-as-read
gnus-catchup-mark)
(while (gnus-summary-find-next (not all))
(gnus-summary-mark-article-as-read gnus-catchup-mark)))
(when (gnus-summary-first-subject (not all))
(while (and
(if to-here (< (point) to-here) t)
(gnus-summary-mark-article-as-read gnus-catchup-mark)
(gnus-summary-find-next (not all))))))
(gnus-set-mode-line 'summary))
t))
(gnus-summary-position-point)))