From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/10234 Path: news.gmane.org!not-for-mail From: Walt Buehring Newsgroups: gmane.emacs.gnus.user Subject: new func: gnus-group-list-more-groups Date: Tue, 29 Jan 2008 18:30:18 GMT Organization: EasyNews, UseNet made Easy! Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201672749 7853 80.91.229.12 (30 Jan 2008 05:59:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jan 2008 05:59:09 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Wed Jan 30 06:59:30 2008 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JK5yr-0005Xr-TO for gegu-info-gnus-english@m.gmane.org; Wed, 30 Jan 2008 06:59:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JK5yQ-0004ZN-Ku for gegu-info-gnus-english@m.gmane.org; Wed, 30 Jan 2008 00:59:02 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!news.glorb.com!news-in-01.newsfeed.easynews.com!easynews.com!easynews!easynews-local!fe09.news.easynews.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (windows-nt) Cancel-Lock: sha1:ahZvlRskIqm5Z5K7uudNVmDUMDs= Original-Lines: 40 Original-X-Complaints-To: abuse@easynews.com X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly. Original-Xref: shelby.stanford.edu gnu.emacs.gnus:80443 X-Mailman-Approved-At: Wed, 30 Jan 2008 00:53:50 -0500 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:10234 Archived-At: 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))))