From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/16578 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.gnus.user Subject: Gnus state, feed commands Date: Sat, 16 Nov 2013 19:17:12 +0100 Organization: Aioe.org NNTP Server Message-ID: <87ob5k1a9q.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1384626000 2818 80.91.229.3 (16 Nov 2013 18:20:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Nov 2013 18:20:00 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Sat Nov 16 19:20:07 2013 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VhkTW-0007Su-ND for gegu-info-gnus-english@m.gmane.org; Sat, 16 Nov 2013 19:20:06 +0100 Original-Received: from localhost ([::1]:36565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhkTW-0008Eh-9W for gegu-info-gnus-english@m.gmane.org; Sat, 16 Nov 2013 13:20:06 -0500 Original-Path: usenet.stanford.edu!goblin3!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help,gnu.emacs.gnus Original-Followup-To: gnu.emacs.gnus Original-Lines: 49 Original-NNTP-Posting-Host: VVbyYd/iFZoeWNmD9i++cQ.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:9/yy1kPR5p6sKp/+lEIsxE+A8rc= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:202243 gnu.emacs.gnus:87705 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:16578 Archived-At: 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