Function: gnus-group-list-groups
gnus-group-list-groups is an autoloaded, interactive and byte-compiled
function defined in gnus-group.el.gz.
Signature
(gnus-group-list-groups &optional LEVEL UNREAD LOWEST UPDATE-LEVEL)
Documentation
List newsgroups with level LEVEL or lower that have unread articles.
Default is all subscribed groups. If argument UNREAD is non-nil, groups with no unread articles are also listed.
Also see the gnus-group-use-permanent-levels variable. If this
variable is non-nil, and UPDATE-LEVEL is non-nil (which is the
case interactively), the level will be updated by this command.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
(defun gnus-group-list-groups (&optional level unread lowest update-level)
"List newsgroups with level LEVEL or lower that have unread articles.
Default is all subscribed groups.
If argument UNREAD is non-nil, groups with no unread articles are also
listed.
Also see the `gnus-group-use-permanent-levels' variable. If this
variable is non-nil, and UPDATE-LEVEL is non-nil (which is the
case interactively), the level will be updated by this command."
(interactive
(list (if current-prefix-arg
(prefix-numeric-value current-prefix-arg)
(or
(gnus-group-default-level nil t)
(gnus-group-default-list-level)
gnus-level-subscribed))
nil nil t)
gnus-group-mode)
(unless level
(setq level (car gnus-group-list-mode)
unread (cdr gnus-group-list-mode)))
(setq level (gnus-group-default-level level))
(gnus-group-setup-buffer)
(gnus-update-format-specifications nil 'group 'group-mode)
(let ((case-fold-search nil)
(props (text-properties-at (line-beginning-position)))
(empty (= (point-min) (point-max)))
(group (gnus-group-group-name))
number)
(set-buffer gnus-group-buffer)
(setq number (funcall gnus-group-prepare-function level unread lowest))
(when (or (and (numberp number)
(zerop number))
(zerop (buffer-size)))
;; No groups in the buffer.
(gnus-message 5 "%s" gnus-no-groups-message))
;; We have some groups displayed.
(goto-char (point-max))
(when (or (not gnus-group-goto-next-group-function)
(not (funcall gnus-group-goto-next-group-function
group props)))
(cond
(empty
(goto-char (point-min)))
((not group)
;; Go to the first group with unread articles.
(gnus-group-search-forward t))
(t
;; Find the right group to put point on. If the current group
;; has disappeared in the new listing, try to find the next
;; one. If no next one can be found, just leave point at the
;; first newsgroup in the buffer.
(when (not (gnus-text-property-search
'gnus-group group nil 'goto))
(let ((groups (cdr-safe (member group gnus-group-list))))
(while (and groups
(not (gnus-text-property-search
'gnus-group (car groups) 'forward 'goto)))
(setq groups (cdr groups)))
(unless groups
(goto-char (point-max))
(forward-line -1)))))))
;; Adjust cursor point.
(gnus-group-position-point)
(when (and update-level gnus-group-use-permanent-levels)
(setq gnus-group-use-permanent-levels level))))