Gnus development mailing list
 help / color / mirror / Atom feed
From: Tibor Simko <tibor.simko@cern.ch>
To: ding@gnus.org
Subject: Re: IMAP IDLE command
Date: Mon, 29 Nov 2010 22:39:32 +0100	[thread overview]
Message-ID: <87sjyj24iz.fsf@pcuds33.cern.ch> (raw)
In-Reply-To: <m362vgbv9x.fsf@quimbies.gnus.org>

On Mon, 29 Nov 2010, Lars Magne Ingebrigtsen wrote:
> Nope.  Gnus really doesn't have any sort of mechanism for getting
> updates from the servers asynchronously.  But it'd be nice if it did.

On a somewhat-related notification subject, and thinking of Gnus
internal (non-biff) notification techniques, what is the latest
state-of-the-art of gnus-notify.el and other per-article notification
approaches?  E.g. does new nnimap respect nnmail-read-incoming-hook or
nnmail-prepare-save-mail-hook or somesuch where a per-article
notification function could be plugged?

A use case would go like this: instead of helping user to decide whether
to do `g' (as in the case of IMAP IDLE), one would do `g' periodically
anyway (e.g. via daemon), and if certain conditions are met for certain
articles, notification would get displayed for each interesting article.
(Could be all incoming ones, could be an interesting subset only.)

To decide whether an article is interesting enough for notification,
users would customize a variable say `gnus-notification-regexps' to
define conditions in nnmail-split-fancy style like:

   (("From" "John Boss")
    ("From" "Jane Wife")
    ("To" "emergency\\.team@foo\\.com")
    ("Subject" "IMAP IDLE"))

Hooking upon nnmail-read-incoming-hook or other some such appropriate
place, if a condition is satisfied, a `gnus-notification-function' would
be called, e.g. a simple notify-send call to display the sender and the
subject header via a function like:

   (defun gnus-notification-notify-send (from subject)
     "Notify about new email sent by FROM on SUBJECT."
     (start-process "gnus-notify-send" nil "notify-send"
                    "-i" "/usr/share/pixmaps/gnome-emacs.png"
                    (format "New email from %s" from)
                    (format "Subject: %s" subject)))

Would such a notification system be of general interest to have in Gnus?
It would basically only help users to decide whether to open certain
groups or not; though it could also serve for `quick-scanning' of
activity in some shared IMAP groups, in case several people have access
to the same IMAP account, for example.  (Though an external real-time
biffer may be better suited for this.)

WDYT?

Best regards
-- 
Tibor Simko




  parent reply	other threads:[~2010-11-29 21:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28 17:09 Łukasz Stelmach
2010-11-28 17:31 ` Byung-Hee HWANG
2010-11-28 21:21   ` Łukasz Stelmach
2010-11-28 21:23   ` Łukasz Stelmach
2010-11-29  4:36 ` Lars Magne Ingebrigtsen
2010-11-29  5:10   ` Daniel Pittman
2010-11-29  6:21     ` Łukasz Stelmach
2010-11-29  7:38       ` Frank Schmitt
2010-11-29 21:25         ` Łukasz Stelmach
2010-11-29 21:37           ` Dan Christensen
2010-12-14 23:20     ` Ted Zlatanov
2010-12-15 19:34       ` Lars Magne Ingebrigtsen
2010-12-15 21:04         ` Ted Zlatanov
2010-11-29 21:39   ` Tibor Simko [this message]
2010-12-01  1:05     ` Łukasz Stelmach
2010-12-01  8:50       ` Steinar Bang
2010-12-02  0:12         ` Łukasz Stelmach
2010-12-02  9:07           ` Steinar Bang
2010-12-02 10:19             ` Łukasz Stelmach
2010-12-02 13:29               ` Steinar Bang
2010-12-02 18:25                 ` Łukasz Stelmach
2010-12-02 13:37               ` Julien Danjou
2010-12-02 18:13                 ` Łukasz Stelmach

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=87sjyj24iz.fsf@pcuds33.cern.ch \
    --to=tibor.simko@cern.ch \
    --cc=ding@gnus.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).