help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Gnus state, feed commands


From: Eric Abrahamsen
Subject: Re: Gnus state, feed commands
Date: Sun, 17 Nov 2013 10:57:39 +0700
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:

> In Gnus, I have a group like this:
>
> mail.misc (5)
>
> to collect incomings mails.
>
> I'm thinking, wouldn't it be cool if you never had to
> check for mails, instead Emacs did that, and then told
> you "you have 5 mails" in the mode line?

That number above comes from the function gnus-group-unread, so you
could probably map all subscribed groups through it and collect the
unread count. I've never messed with the mode line, so I'm not sure
about using a function to produce a value for it...

> I guess I could schedule checking with
> `run-with-idle-timer' - coincidentally, that's great,
> because when you work (i.e., type) you don't want to be
> disturbed and get mails, but when you idle for some
> time, it would be a good slot for Emacs to check for
> them.
>
> To change the mode line, I have this in my .emacs:
>
> (defun set-mode-line ()
>   "Mode line: Show the mode line elements if the
> respective global booleans are set."
>   (interactive)
>   (setq-default mode-line-format
>    `(" "
>      (*show-mode-line-modified* mode-line-modified)
>      (*show-mode-line-modified* " ")
>      (*show-mode-line-caption* *mode-line-caption*)
>      (*show-mode-line-caption* " ")
>      (*show-default-directory* default-directory)
>      (*show-mode-line-buffer-identification* mode-line-buffer-identification)
>      (*show-mode-line-buffer-identification* " ")
>      (line-number-mode   "[%l] ")
>      (column-number-mode "{%c} ")
>      (*show-mode-line-modes* mode-line-modes)
>      )))
> (set-mode-line)
>
> 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?




reply via email to

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