Emanuel Berg <embe8...@student.uu.se> 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
available.

--
Regards,
WGG


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to