Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: info-gnus-english@gnu.org
Subject: Gnus state, feed commands
Date: Sat, 16 Nov 2013 19:17:12 +0100	[thread overview]
Message-ID: <87ob5k1a9q.fsf@nl106-137-194.student.uu.se> (raw)

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

             reply	other threads:[~2013-11-16 18:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-16 18:17 Emanuel Berg [this message]
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

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=87ob5k1a9q.fsf@nl106-137-194.student.uu.se \
    --to=embe8573@student.uu.se \
    --cc=info-gnus-english@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.
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).