Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Yuri D'Elia <wavexx@users.sf.net>
To: info-gnus-english@gnu.org
Subject: Re: Gnus and new mail notification
Date: Sat, 25 Dec 2010 16:26:43 +0100	[thread overview]
Message-ID: <87tyi1dgb0.fsf@savara.sat.thregr.org> (raw)
In-Reply-To: <87aajuhubw.fsf@nzebook.haselwarter.org>

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	other threads:[~2010-12-25 15:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-24 23:33 Yuri D'Elia
2010-12-25 13:10 ` Philipp Haselwarter
2010-12-25 15:26   ` Yuri D'Elia [this message]
2010-12-25 21:52     ` Tassilo Horn
2010-12-26 20:11 ` Yuri D'Elia
2011-01-02 12:02   ` Philipp Haselwarter
     [not found] <mailman.26.1293233609.7272.info-gnus-english@gnu.org>
2010-12-25 13:25 ` e20100633
2010-12-26 18:26   ` Philipp Haselwarter
2010-12-26 18:59     ` Philipp Haselwarter
2010-12-25 20:31 ` Richard Riley
2010-12-25 21:55   ` Tassilo Horn
2010-12-25 22:56   ` Yuri D'Elia
     [not found]   ` <mailman.13.1293317806.24913.info-gnus-english@gnu.org>
2010-12-25 23:19     ` Richard Riley
2010-12-26 16:22       ` Yuri D'Elia
     [not found]       ` <mailman.1.1293380566.6185.info-gnus-english@gnu.org>
2010-12-27  8:11         ` Richard Riley
2010-12-27  9:25           ` Thierry Volpiatto
     [not found]           ` <mailman.2.1293441979.18751.info-gnus-english@gnu.org>
2010-12-27 13:30             ` Richard Riley
2010-12-27 15:39               ` Philipp Haselwarter
2010-12-27 16:04               ` Thierry Volpiatto
     [not found]               ` <mailman.8.1293465927.24495.info-gnus-english@gnu.org>
2010-12-27 16:42                 ` Richard Riley
2010-12-27 17:47                   ` Thierry Volpiatto
     [not found]                   ` <mailman.19.1293472126.24495.info-gnus-english@gnu.org>
2010-12-27 18:11                     ` Richard Riley
2010-12-27 19:09                       ` Thierry Volpiatto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tyi1dgb0.fsf@savara.sat.thregr.org \
    --to=wavexx@users.sf.net \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).