Function: gnus-group-catchup-current
gnus-group-catchup-current is an interactive and byte-compiled
function defined in gnus-group.el.gz.
Signature
(gnus-group-catchup-current &optional N ALL)
Documentation
Mark all unread articles in the current newsgroup as read.
If prefix argument N is numeric, the next N newsgroups will be caught up. If ALL is non-nil, marked articles will also be marked as read. Cross references (Xref: header) of articles are ignored. The number of newsgroups that this function was unable to catch up is returned.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
;; Group catching up.
(defun gnus-group-catchup-current (&optional n all)
"Mark all unread articles in the current newsgroup as read.
If prefix argument N is numeric, the next N newsgroups will be
caught up. If ALL is non-nil, marked articles will also be marked as
read. Cross references (Xref: header) of articles are ignored.
The number of newsgroups that this function was unable to catch
up is returned."
(interactive "P" gnus-group-mode)
(let ((groups (gnus-group-process-prefix n))
(ret 0)
group)
(unless groups (error "No groups selected"))
(if (not
(or (not gnus-interactive-catchup) ;Without confirmation?
gnus-expert-user
(gnus-y-or-n-p
(format
(if all
"Do you really want to mark all articles in %s as read? "
"Mark all unread articles in %s as read? ")
(if (= (length groups) 1)
(car groups)
(format "these %d groups" (length groups)))))))
n
(while (setq group (pop groups))
(gnus-group-remove-mark group)
;; Virtual groups have to be given special treatment.
(let ((method (gnus-find-method-for-group group)))
(when (eq 'nnvirtual (car method))
(nnvirtual-catchup-group
(gnus-group-real-name group) (nth 1 method) all)))
(cond
((>= (gnus-group-level group) gnus-level-zombie)
(gnus-message 2 "Dead groups can't be caught up"))
((prog1
(gnus-group-goto-group group)
(gnus-group-catchup group all))
(gnus-group-update-group-line))
(t
(setq ret (1+ ret)))))
(gnus-group-next-unread-group 1)
ret)))