From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82172 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.emacs.gnus.general Subject: Re: Username for gnus-notifications Date: Thu, 30 Aug 2012 13:01:06 +0200 Message-ID: <87y5kw63v1.fsf@micropit.couberia.bzh> References: <87a9xcyk00.fsf@thinkpad.tsdh.de> <878vcwri8g.fsf@dex.adm.naquadah.org> <873934yiml.fsf@thinkpad.tsdh.de> <874nnkredw.fsf@dex.adm.naquadah.org> <87oblswz56.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346324571 32306 80.91.229.3 (30 Aug 2012 11:02:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Aug 2012 11:02:51 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M30440@lists.math.uh.edu Thu Aug 30 13:02:53 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T72WO-0000Er-G9 for ding-account@gmane.org; Thu, 30 Aug 2012 13:02:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1T72V6-0005BQ-8A; Thu, 30 Aug 2012 06:01:28 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1T72V5-0005BG-1K for ding@lists.math.uh.edu; Thu, 30 Aug 2012 06:01:27 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1T72Uz-0004Mf-AD for ding@lists.math.uh.edu; Thu, 30 Aug 2012 06:01:26 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1T72Ux-0003GS-A4 for ding@gnus.org; Thu, 30 Aug 2012 13:01:19 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T72Ux-0006dQ-OE for ding@gnus.org; Thu, 30 Aug 2012 13:01:19 +0200 Original-Received: from arennes-651-1-136-126.w2-2.abo.wanadoo.fr ([2.2.143.126]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Aug 2012 13:01:19 +0200 Original-Received: from pmlists by arennes-651-1-136-126.w2-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Aug 2012 13:01:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: arennes-651-1-136-126.w2-2.abo.wanadoo.fr User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (gnu/linux) Cancel-Lock: sha1:TzWCByqNAXn/RnjEhvXyTbX5CiQ= X-Spam-Score: -2.1 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82172 Archived-At: 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