[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Gnus state, feed commands
From: |
Emanuel Berg |
Subject: |
Gnus state, feed commands |
Date: |
Sat, 16 Nov 2013 19:17:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
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
- Gnus state, feed commands,
Emanuel Berg <=