Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Gnus state, feed commands
@ 2013-11-16 18:17 Emanuel Berg
  2013-11-16 19:31 ` W. Greenhouse
       [not found] ` <mailman.6381.1384630484.10748.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Emanuel Berg @ 2013-11-16 18:17 UTC (permalink / raw)
  To: info-gnus-english

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?

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?

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573

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

end of thread, other threads:[~2013-11-21 22:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-16 18:17 Gnus state, feed commands Emanuel Berg
2013-11-16 19:31 ` W. Greenhouse
     [not found] ` <mailman.6381.1384630484.10748.info-gnus-english@gnu.org>
2013-11-16 20:03   ` Emanuel Berg
2013-11-17 23:57     ` Emanuel Berg
2013-11-20 23:00       ` W. Greenhouse
     [not found]       ` <mailman.6725.1384988464.10748.info-gnus-english@gnu.org>
2013-11-21 22:54         ` Emanuel Berg

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