Gnus development mailing list
 help / color / mirror / Atom feed
From: "Peter Münster" <pmlists@free.fr>
To: ding@gnus.org
Subject: Re: Username for gnus-notifications
Date: Thu, 30 Aug 2012 13:01:06 +0200	[thread overview]
Message-ID: <87y5kw63v1.fsf@micropit.couberia.bzh> (raw)
In-Reply-To: <87oblswz56.fsf@thinkpad.tsdh.de>

On Thu, Aug 30 2012, Tassilo Horn wrote:

> For example, it seems feasible to use :actions and :on-action to
> display the mail in Gnus when I click the notification.

Yes, that works quite well. Here the function, that I use:

--8<---------------cut here---------------start------------->8---
(defun pm/gnus (&optional id key)
  "Switch to group buffer, or start gnus if it does not exist."
  (interactive)
  (when (or (not key) (string= key "email"))
    (if (get-buffer "*Group*")
        (progn (switch-to-buffer "*Group*") (gnus-group-get-new-news))
      (gnus))
    (if (display-graphic-p)
        (x-focus-frame nil))))

[...]
        (notifications-notify :title "New Email!" :timeout (* 60 1000)
                              :actions '("email" "read email") :on-action 'pm/gnus)
[...]
--8<---------------cut here---------------end--------------->8---

-- 
           Peter




  reply	other threads:[~2012-08-30 11:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30  6:25 Tassilo Horn
2012-08-30  6:45 ` Julien Danjou
2012-08-30  6:54   ` Tassilo Horn
2012-08-30  8:08     ` Julien Danjou
2012-08-30  8:40       ` Tassilo Horn
2012-08-30 11:01         ` Peter Münster [this message]
2012-08-30 13:10           ` Tassilo Horn
2012-08-30 15:18             ` Julien Danjou
2012-08-30 17:45               ` Tassilo Horn
2012-08-30 19:04             ` Peter Münster
2012-08-30 19:46               ` Tassilo Horn
2012-08-30 21:02                 ` Julien Danjou
2012-08-31  6:23                   ` Tassilo Horn
2012-08-30 15:17         ` Julien Danjou
2012-08-30 14:13   ` Tassilo Horn
2012-08-30 15:19     ` Julien Danjou
2012-08-30 17:47       ` Tassilo Horn
2012-08-31  7:54       ` Tassilo Horn

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=87y5kw63v1.fsf@micropit.couberia.bzh \
    --to=pmlists@free.fr \
    --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).