info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnus and new mail notification


From: Yuri D'Elia
Subject: Re: Gnus and new mail notification
Date: Sat, 25 Dec 2010 16:26:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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? ;)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]