From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/10361 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.user,gmane.emacs.gnus.general Subject: Re: new func: gnus-group-list-more-groups Date: Thu, 14 Feb 2008 20:49:08 +0100 Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203018605 26049 80.91.229.12 (14 Feb 2008 19:50:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Feb 2008 19:50:05 +0000 (UTC) Cc: info-gnus-english@gnu.org To: Walt Buehring , Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Thu Feb 14 20:50:28 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 1JPk6B-0005av-V9 for gegu-info-gnus-english@m.gmane.org; Thu, 14 Feb 2008 20:50:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPk5i-0007o2-61 for gegu-info-gnus-english@m.gmane.org; Thu, 14 Feb 2008 14:49:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPk5g-0007np-KT for info-gnus-english@gnu.org; Thu, 14 Feb 2008 14:49:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPk5d-0007nF-EM for info-gnus-english@gnu.org; Thu, 14 Feb 2008 14:49:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPk5d-0007nC-B8 for info-gnus-english@gnu.org; Thu, 14 Feb 2008 14:49:49 -0500 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JPk5c-0007Sg-PU for info-gnus-english@gnu.org; Thu, 14 Feb 2008 14:49:49 -0500 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id m1EJnjVv029655; Thu, 14 Feb 2008 20:49:46 +0100 (MET) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 922F912F40; Thu, 14 Feb 2008 20:49:45 +0100 (CET) X-Face: #vK]N[`vqjuod*|)'[iD7/"3AB-ApT%fmN"LWAg@oS7OesGv~)n[OBTLM#I="J'Y^-7I I/ps7o_'IK@#-Rs{::DZ@O8yS|fexe,XslY[:dNWOb~>?mC-&i_c)say:"\IpA.5U.b]'NY; Pks{lb h.+#6%DpZuaK3dcHB`Av3zc:r!C%~s0&m, tWj]&}, qg.+0ww2gK%f!:GK|wMl.I!(voY*1"^li8"~B BNG)9LvPi?^DMR-GVDnZqhu*3Hi, +g=wFhI)BL6&u{EOVEHjVEVq~d?_}lMntWAc3(6?kftjc>_f>! g0wM(qPM$d5]^TT_Qyi&L?LGVG)SHN;Gk/,pkY9,~ Mail-Followup-To: Walt Buehring , In-Reply-To: (Walt Buehring's message of "Tue, 29 Jan 2008 18:30:18 GMT") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.90 (gnu/linux) X-DCC-Rhyolite-Metrics: poseidon 104; Body=3 Fuz1=3 Fuz2=3 X-Virus-Scanned: by amavisd-new X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:10361 gmane.emacs.gnus.general:66310 Archived-At: [ Shifting this to the development list: `ding@gnus.org'. Mail-Followup-To set. ] On Tue, Jan 29 2008, Walt Buehring wrote: > 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. It should be a separate command, I think. > 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). I need to clarify if your disclaimer (for changes to Emacs) is sufficient to install these changes. > 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) I don't think it's useful to duplicate `gnus-group-list-groups' here. > ;; 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))) I'd simply use `(1+ maxlevel)' unless maxlevel is >= `gnus-level-killed'. > ;; 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))) Instead, the prefix arg could be `activate', i.e. only call `gnus-activate-foreign-newsgroups' when `activate' is non-nil. > (gnus-group-list-groups newlevel t)))) Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/