Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: gnus-group-current-level ?
Date: Thu, 24 Jan 2008 14:37:48 +0900	[thread overview]
Message-ID: <b4m1w87ss0j.fsf@jpl.org> (raw)
In-Reply-To: <87r6g73jt1.fsf@bzg.ath.cx>

>>>>> 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)))))



      reply	other threads:[~2008-01-24  5:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-24  4:54 Bastien
2008-01-24  5:37 ` Katsumi Yamaoka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4m1w87ss0j.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).