From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Gnus state, feed commands
Date: Sun, 17 Nov 2013 10:57:39 +0700 [thread overview]
Message-ID: <87eh6fvfws.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 87ob5k1a9q.fsf__48304.1452513591$1384626024$gmane$org@nl106-137-194.student.uu.se
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?
next prev parent reply other threads:[~2013-11-17 3:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-16 18:17 Gnus state, feed commands Emanuel Berg
2013-11-16 18:25 ` Bastien
[not found] ` <mailman.6374.1384626320.10748.help-gnu-emacs@gnu.org>
2013-11-16 18:31 ` Emanuel Berg
2013-11-16 18:50 ` Bastien
[not found] ` <mailman.6376.1384627827.10748.help-gnu-emacs@gnu.org>
2013-11-16 19:16 ` Emanuel Berg
2013-11-16 19:23 ` Eli Zaretskii
2013-11-17 3:57 ` Eric Abrahamsen [this message]
[not found] ` <mailman.6403.1384660589.10748.help-gnu-emacs@gnu.org>
2013-11-17 13:47 ` Emanuel Berg
2013-11-17 23:56 ` Emanuel Berg
2013-11-18 2:43 ` Eric Abrahamsen
[not found] ` <mailman.6460.1384742532.10748.help-gnu-emacs@gnu.org>
2013-11-18 22:11 ` Emanuel Berg
2013-11-19 1:53 ` Eric Abrahamsen
[not found] ` <mailman.6527.1384825935.10748.help-gnu-emacs@gnu.org>
2013-11-19 2:07 ` Emanuel Berg
2013-11-19 8:50 ` Eric Abrahamsen
[not found] ` <mailman.6544.1384850944.10748.help-gnu-emacs@gnu.org>
2013-11-19 22:31 ` Size of Gnus and Emacs (was: Re: Gnus state, feed commands) Emanuel Berg
2013-11-20 3:34 ` Size of Gnus and Emacs Jambunathan K
[not found] ` <mailman.6582.1384918585.10748.help-gnu-emacs@gnu.org>
2013-11-20 3:41 ` Emanuel Berg
2013-11-20 7:48 ` Eric Abrahamsen
[not found] ` <mailman.6592.1384933633.10748.help-gnu-emacs@gnu.org>
2013-11-20 16:35 ` Emanuel Berg
2013-11-21 0:59 ` Eric Abrahamsen
2013-12-01 6:49 ` Jambunathan K
[not found] ` <mailman.7692.1385880597.10748.help-gnu-emacs@gnu.org>
2013-12-01 16:46 ` Emanuel Berg
2013-12-02 5:29 ` Jambunathan K
2013-12-02 16:48 ` Emanuel Berg
2013-12-02 5:51 ` Jambunathan K
2013-12-02 16:53 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eh6fvfws.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.