[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new func: gnus-group-list-more-groups
From: |
Walt Buehring |
Subject: |
new func: gnus-group-list-more-groups |
Date: |
Tue, 29 Jan 2008 18:30:18 GMT |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (windows-nt) |
Been making more use of group levels lately and thought it would be
awfully nice if "L" (normally gnus-group-list-all-groups) would
instead progressively increase the listing level in steps. That is,
determine the currently listed level and bump it to display more.
Below is a poor implementation of the idea (with level bumps hardcoded
in a case stmt). As a side benefit it also raises the activation
level once gnus-activate-level is exceeded - which is nice.(?)
-W
(defun gnus-group-list-more-groups (&optional arg)
"Progressively list additional groups at increasing levels.
With arg, only list groups with level ARG or lower."
(interactive "P")
(if arg
(gnus-group-list-groups arg t)
;; determine the max level group currently displayed
(let ((maxlevel 0)
glevel newlevel)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(setq glevel (or (get-text-property (point) 'gnus-level) 0)
maxlevel (max glevel maxlevel))
(forward-line 1)))
;; choose next level in progression
(setq newlevel (case maxlevel
(2 3)
(3 5)
(5 6)
(t 9)))
;; activate at new level if appropriate
(when (> newlevel gnus-activate-level)
(let ((gnus-activate-level newlevel)
(gnus-activate-foreign-newsgroups newlevel))
(gnus-group-get-new-news newlevel)))
(gnus-group-list-groups newlevel t))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- new func: gnus-group-list-more-groups,
Walt Buehring <=