From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan Moringen Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add notifications.el Date: Fri, 11 Jun 2010 01:16:13 +0200 Message-ID: <13588_1276211690_ZZh01350LoUj0.00_1276211773.5476.15.camel@localhost.localdomain> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7BIT X-Trace: dough.gmane.org 1276211702 26551 80.91.229.12 (10 Jun 2010 23:15:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 Jun 2010 23:15:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: julien@danjou.info Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 11 01:15:00 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OMqxg-0004MZ-9A for ged-emacs-devel@m.gmane.org; Fri, 11 Jun 2010 01:15:00 +0200 Original-Received: from localhost ([127.0.0.1]:51808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMqxf-0001CJ-Fg for ged-emacs-devel@m.gmane.org; Thu, 10 Jun 2010 19:14:59 -0400 Original-Received: from [140.186.70.92] (port=42752 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMqxa-0001CE-5W for emacs-devel@gnu.org; Thu, 10 Jun 2010 19:14:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMqxZ-0000Lz-1N for emacs-devel@gnu.org; Thu, 10 Jun 2010 19:14:54 -0400 Original-Received: from mux2-unibi-smtp.hrz.uni-bielefeld.de ([129.70.204.73]:41088) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMqxY-0000LU-SX for emacs-devel@gnu.org; Thu, 10 Jun 2010 19:14:53 -0400 Original-Received: from pmxchannel-daemon.mux2-unibi-smtp.hrz.uni-bielefeld.de by mux2-unibi-smtp.hrz.uni-bielefeld.de (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) id <0L3T00A00N8QS600@mux2-unibi-smtp.hrz.uni-bielefeld.de> for emacs-devel@gnu.org; Fri, 11 Jun 2010 01:14:50 +0200 (CEST) Original-Received: from [192.168.2.100] ([217.25.174.3]) by mux2-unibi-smtp.hrz.uni-bielefeld.de (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPPSA id <0L3T00A0MN8PS500@mux2-unibi-smtp.hrz.uni-bielefeld.de>; Fri, 11 Jun 2010 01:14:49 +0200 (CEST) In-reply-to: X-Mailer: Evolution 2.30.1.2 X-EnvFrom: jan.moringen@uni-bielefeld.de X-PMX-Version: 5.5.9.395186, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2010.6.10.230613, pmx7 X-Connecting-IP: 217.25.174.3 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125713 Archived-At: Hi Julien, thank you for this patch. I have two suggestions: 1. Maybe the docstring should mention that :body and action name strings can contain markup like bold and that the notification does not display a string if it contains invalid markup like text. I think, `xml-escape-string' can be used to safely display strings that may contain invalid markup. 2. Older versions of libnotify seem to use a slightly different interface: it seems like the signal for closing notifications does not include a reason (see output of dbus-monitor [1]). I suggest making the reason argument in the -on-closed handler optional. What do you think? Kind regards, Jan [1] dbus-monitor output: method call sender=:1.1293 -> dest=org.freedesktop.Notifications path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "Emacs" uint32 0 string "/homes/jmoringe/opt/emacs/share/emacs/24.0.50/etc/images/icons/hicolor/scalable/apps/emacs.svg" string "Bla dsf [bla]" string "bla Bla <b>dsf</b>" array [ string ":subscribe" string "subscribe" ] array [ ] int32 -1 method return sender=:1.19 -> dest=:1.1293 reply_serial=6 uint32 245 signal sender=:1.19 -> dest=:1.1293 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed uint32 245