* slight alteration to gnus-group-catchup-current
@ 1997-11-24 21:05 Dan Christensen
0 siblings, 0 replies; only message in thread
From: Dan Christensen @ 1997-11-24 21:05 UTC (permalink / raw)
To catchup all groups in a topic, I put the point on the topic line,
mark the topic with `#', and then hit `c y' only to get the error
message: "No group on the current line". The following patch
makes gnus-group-catchup-current a little more forgiving; it
only complains if it is unable to come up with a list of groups
to catchup, whether from the prefix argument, the region, the
process mark, or the current line. gnus-group-process-prefix
will now also skip over topic lines gracefully when given a count.
Maybe gnus-group-process-prefix should return all groups in a
topic when point is on a topic line and there's no prefix, no
active region, and no process-marked articles?
*** gnus-group.el Thu Nov 6 17:39:45 1997
--- gnus-group.el Mon Nov 24 16:02:19 1997
***************
*** 1417,1425 ****
(n (abs n))
group groups)
(save-excursion
! (while (and (> n 0)
! (setq group (gnus-group-group-name)))
! (push group groups)
(setq n (1- n))
(gnus-group-next-group way)))
(nreverse groups)))
--- 1417,1425 ----
(n (abs n))
group groups)
(save-excursion
! (while (> n 0)
! (if (setq group (gnus-group-group-name))
! (push group groups))
(setq n (1- n))
(gnus-group-next-group way)))
(nreverse groups)))
***************
*** 2401,2416 ****
(defun gnus-group-catchup-current (&optional n all)
"Mark all articles not marked as unread in current newsgroup as read.
! If prefix argument N is numeric, the ARG next 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 difference between N and actual number of newsgroups that were
! caught up is returned."
(interactive "P")
- (unless (gnus-group-group-name)
- (error "No group on the current line"))
(let ((groups (gnus-group-process-prefix n))
(ret 0))
(if (not
(or (not gnus-interactive-catchup) ;Without confirmation?
gnus-expert-user
--- 2401,2415 ----
(defun gnus-group-catchup-current (&optional n all)
"Mark all articles not marked as unread in 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")
(let ((groups (gnus-group-process-prefix n))
(ret 0))
+ (unless groups (error "No groups selected"))
(if (not
(or (not gnus-interactive-catchup) ;Without confirmation?
gnus-expert-user
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-11-24 21:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-24 21:05 slight alteration to gnus-group-catchup-current Dan Christensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).