From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/14404 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.user Subject: Re: Gnus and new mail notification Date: Sat, 25 Dec 2010 22:52:56 +0100 Message-ID: <87oc89a5af.fsf@member.fsf.org> References: <87y67evj9j.fsf@savara.sat.thregr.org> <87aajuhubw.fsf@nzebook.haselwarter.org> <87tyi1dgb0.fsf@savara.sat.thregr.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1293314005 7183 80.91.229.12 (25 Dec 2010 21:53:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Dec 2010 21:53:25 +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 Dec 25 22:53:20 2010 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PWc3B-0003S8-26 for gegu-info-gnus-english@m.gmane.org; Sat, 25 Dec 2010 22:53:17 +0100 Original-Received: from localhost ([127.0.0.1]:44336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWc3A-0007e6-Gp for gegu-info-gnus-english@m.gmane.org; Sat, 25 Dec 2010 16:53:16 -0500 Original-Received: from [140.186.70.92] (port=53131 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWc38-0007e0-0X for info-gnus-english@gnu.org; Sat, 25 Dec 2010 16:53:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PWc36-0002EL-IB for info-gnus-english@gnu.org; Sat, 25 Dec 2010 16:53:13 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:59186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PWc36-0002EH-6N for info-gnus-english@gnu.org; Sat, 25 Dec 2010 16:53:12 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PWc33-0003P4-Tm for info-gnus-english@gnu.org; Sat, 25 Dec 2010 22:53:09 +0100 Original-Received: from 95-88-32-105-dynip.superkabel.de ([95.88.32.105]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Dec 2010 22:53:09 +0100 Original-Received: from tassilo by 95-88-32-105-dynip.superkabel.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Dec 2010 22:53:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 95-88-32-105-dynip.superkabel.de User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:cIVQqzoHxlCFo0dKfqhBL9qWuHY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 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: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:14404 Archived-At: Yuri D'Elia writes: Hi Yuri, >> and you do something different (*desktop notification* instead of >> *mode line* stuff)! > > gnus-desktop-notify? gnus-ext-notify? I like the former, cause desktop notifications is the common term for that kind of notifications. >> How about making it a global minor mode? > > Any pointer in how to do that? > I don't do elisp very often. ,----[ C-h f define-global-minor-mode RET ] | define-global-minor-mode is an alias for `define-globalized-minor-mode' in | `easy-mmode.el'. | | (define-global-minor-mode GLOBAL-MODE MODE TURN-ON &rest KEYS) | | Make a global mode GLOBAL-MODE corresponding to buffer-local minor MODE. | TURN-ON is a function that will be called with no args in every buffer | and that should try to turn MODE on if applicable for that buffer. | KEYS is a list of CL-style keyword arguments. As the minor mode | defined by this function is always global, any :global keyword is | ignored. Other keywords have the same meaning as in `define-minor-mode', | which see. In particular, :group specifies the custom group. | The most useful keywords are those that are passed on to the | `defcustom'. It normally makes no sense to pass the :lighter | or :keymap keywords to `define-globalized-minor-mode', since these | are usually passed to the buffer-local version of the minor mode. | | If MODE's set-up depends on the major mode in effect when it was | enabled, then disabling and reenabling MODE should make MODE work | correctly with the current major mode. This is important to | prevent problems with derived modes, that is, major modes that | call another major mode in their body. `---- There's also an example in ,----[ (info "(elisp)Defining Minor Modes") ] | The macro `define-minor-mode' offers a convenient way of implementing a | mode in one self-contained definition. `---- Bye, Tassilo