Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-group-current-level ?
@ 2008-01-24  4:54 Bastien
  2008-01-24  5:37 ` Katsumi Yamaoka
  0 siblings, 1 reply; 2+ messages in thread
From: Bastien @ 2008-01-24  4:54 UTC (permalink / raw)
  To: ding

Hi,

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?

Thanks!

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.

-- 
Bastien



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gnus-group-current-level ?
  2008-01-24  4:54 gnus-group-current-level ? Bastien
@ 2008-01-24  5:37 ` Katsumi Yamaoka
  0 siblings, 0 replies; 2+ messages in thread
From: Katsumi Yamaoka @ 2008-01-24  5:37 UTC (permalink / raw)
  To: ding

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-24  5:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-24  4:54 gnus-group-current-level ? Bastien
2008-01-24  5:37 ` Katsumi Yamaoka

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