From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/14402 Path: news.gmane.org!not-for-mail From: Yuri D'Elia Newsgroups: gmane.emacs.gnus.user Subject: Re: Gnus and new mail notification Date: Sat, 25 Dec 2010 16:26:43 +0100 Message-ID: <87tyi1dgb0.fsf@savara.sat.thregr.org> References: <87y67evj9j.fsf@savara.sat.thregr.org> <87aajuhubw.fsf@nzebook.haselwarter.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1293290826 24909 80.91.229.12 (25 Dec 2010 15:27:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Dec 2010 15:27:06 +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 16:27:00 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 1PWW1J-0007eh-6H for gegu-info-gnus-english@m.gmane.org; Sat, 25 Dec 2010 16:26:57 +0100 Original-Received: from localhost ([127.0.0.1]:56738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWW1I-0001wm-Nc for gegu-info-gnus-english@m.gmane.org; Sat, 25 Dec 2010 10:26:56 -0500 Original-Received: from [140.186.70.92] (port=44930 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWW1G-0001wh-Ku for info-gnus-english@gnu.org; Sat, 25 Dec 2010 10:26:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PWW1F-0004Uj-Et for info-gnus-english@gnu.org; Sat, 25 Dec 2010 10:26:54 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:48034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PWW1F-0004UT-4e for info-gnus-english@gnu.org; Sat, 25 Dec 2010 10:26:53 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PWW1D-0007ci-1q for info-gnus-english@gnu.org; Sat, 25 Dec 2010 16:26:51 +0100 Original-Received: from 88-149-142-67.dynamic.ngi.it ([88.149.142.67]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Dec 2010 16:26:51 +0100 Original-Received: from wavexx by 88-149-142-67.dynamic.ngi.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Dec 2010 16:26:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 62 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 88-149-142-67.dynamic.ngi.it User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:Eufp0CAT3/EiuKHbysGyyVe1MYA= 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:14402 Archived-At: On Sat, 25 Dec 2010 14:10:11 +0100, Philipp Haselwarter wrote: > Please try harder, there are already at least two with that name: > > http://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg01615.html > http://www.emacswiki.org/emacs/gnus-notify.el > > and you do something different (*desktop notification* instead of *mode > line* stuff)! gnus-desktop-notify? gnus-ext-notify? > While I was testing you lib, I discovered that > `gnus-newsrc-alist'-elements `g' can contain 3 different type elements > at (nth 2 g) (ie `gnus-info-read'): > - `nil' > - a list, like '(1 . 140) > - a list of lists, like '((1 . 9)) > > Obviously, a cdar on a list (eg. (cdar '(1 . 140))) is invalid, which > can result in problems in `gnus-notify-check'. I noticed that, though by reading the source I don't understand how the list of list is actually used. It's also weird how the unread count is stored (in a text-property instead of using newsrc-alist), requiring you to perform an additional lookup using gnus-group-unread. > http://www.gnu.org/software/emacs/elisp/html_node/Coding-Conventions.html > ,---- > | Simply loading a package should not change Emacs's editing > | behavior. Include a command or commands to enable and disable the > | feature, or to invoke it. > | > | This convention is mandatory for any file that includes custom > | definitions. If fixing such a file to follow this convention requires an > | incompatible change, go ahead and make the incompatible change; don't > | postpone it. > `---- > > You can simply wrap a function around the adding/removal of the hooks: <...> > How about making it a global minor mode? Any pointer in how to do that? I don't do elisp very often. > And I noticed that you put spaces around the enclosing parentheses of > your let-assignments, which I found a bit weird, so here's a whitespace > patch :p I like the fact that assignments line-up this way: (let ( (...) (...) ) ...) I don't remember where I first saw this style. > (don't take this one too seriously ;) Shouldn't I? ;)