From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66199 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-group-current-level ? Date: Thu, 24 Jan 2008 14:37:48 +0900 Organization: Emacsen advocacy group Message-ID: References: <87r6g73jt1.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201153160 22508 80.91.229.12 (24 Jan 2008 05:39:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jan 2008 05:39:20 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14690@lists.math.uh.edu Thu Jan 24 06:39:35 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1JHuoJ-0006gv-0z for ding-account@gmane.org; Thu, 24 Jan 2008 06:39:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1JHuna-0000CR-V0; Wed, 23 Jan 2008 23:38:51 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1JHunX-0000Bz-Tk for ding@lists.math.uh.edu; Wed, 23 Jan 2008 23:38:47 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1JHunS-0000aY-1o for ding@lists.math.uh.edu; Wed, 23 Jan 2008 23:38:47 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1JHunT-0004Ex-00 for ; Thu, 24 Jan 2008 06:38:43 +0100 Original-Received: from [66.225.201.151] (port=38525 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.68) (envelope-from ) id 1JHumo-0001a1-1Q for ding@gnus.org; Wed, 23 Jan 2008 23:38:02 -0600 X-Hashcash: 1:20:080124:ding@gnus.org::Frkd6DKBA5X1uIlV:00001LZR X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:HXJmX5Q3V45nqza1OMvjIdcWI0M= X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.4 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66199 Archived-At: >>>>> Bastien wrote: > I'm trying to write a function that will fetch the current group level > and increment it by one before redisplaying. Basically something like > this: > (define-key gnus-group-mode-map (kbd "C-^") > (lambda() (gnus (1+ gnus-group-current-level)))) > ... but of course, gnus-group-current-level doesn't exist. Is there a > way around? Any ideas? That's the return value of the `gnus-group-group-level' function. The function has to be made a command, i.e., an interactive function. And, I think using `gnus-group-get-new-news' is better rather than to use `gnus'. > PS: I want to do this because my group levels reflect their importance. > When I process my inboxes, I first check for 1, then 2 [staying in 2 at > work], then 3, etc. Trying to avoid distraction. Though I cannot imagine the usefulness ;-), how about this one? (define-key gnus-group-mode-map (kbd "C-^") (lambda () (interactive) (gnus-group-get-new-news (min (1+ (gnus-group-group-level)) (1- gnus-level-default-unsubscribed)))))