[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnus state, feed commands

From: W. Greenhouse
Subject: Re: Gnus state, feed commands
Date: Sat, 16 Nov 2013 19:31:21 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <> writes:


> So you see, putting that information in the mode line
> shouldn't be that difficult.
> But what I don't know is: how do I access the "state"
> of Gnus? I.e., how do I get that number "5"? And, how
> do I feed command to Gnus, in the background, without
> switching buffers or triggering any other visual noise?

There are some functions you can use which take the name of the group as
displayed in the *Group* buffer, given as a string.  For example,

(gnus-number-of-unseen-articles-in-group "mail.misc")

which returns an integer.  Obviously, you could track several groups and
add them together, since the return value of this function is a number.

As for the idle timer part of your scheme, consider using (info "(gnus)
Daemons"), which is Gnus's built-in interface to the Emacs timer
facility.  Conveniently, this will let you start the timers when Gnus is
started, and tear them down if you quit Gnus, which saves you from some
of the trouble of handling errors when information from the groups isn't


reply via email to

[Prev in Thread] Current Thread [Next in Thread]