From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Gnus state, feed commands Date: Sat, 16 Nov 2013 19:17:12 +0100 Organization: Aioe.org NNTP Server Message-ID: <87ob5k1a9q.fsf__48304.1452513591$1384626024$gmane$org@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1384626013 2944 80.91.229.3 (16 Nov 2013 18:20:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Nov 2013 18:20:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 16 19:20:19 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1VhkTj-0007b5-I5 for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Nov 2013 19:20:19 +0100 Original-Received: from localhost ([::1]:36567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhkTj-0008JC-1j for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Nov 2013 13:20:19 -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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94512 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