From: Michael Albinus <michael.albinus@gmx.de>
To: Julien Danjou <julien@danjou.info>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: [PATCH] Add notifications.el
Date: Mon, 07 Jun 2010 17:36:04 +0200 [thread overview]
Message-ID: <nqocfm4zyz.fsf@alcatel-lucent.com> (raw)
In-Reply-To: <sa3fx0y3m9d.fsf@cigue.easter-eggs.fr> (Julien Danjou's message of "Mon, 7 Jun 2010 17:17:34 +0200")
Julien Danjou <julien@danjou.info> writes:
>>> +(defun notifications-notify (&rest params)
>>> + "Send notification via D-Bus using the Freedesktop notification protocol.
>>> +Various PARAMS can be set:
>>> +
>>> + :title The notification title.
>>> + :body The notification body text.
>>
>> You might mention, that these are mandatory parameters. Check the effect of
>>
>> (notifications-notify :urgency "low")
>
> They are not mandatory, even if it's weird. It works fine here, even if
> the text is blank.
They are not mandatory functionally (there is no D-Bus error), but as
you say, the result is weird. I like Stefan's idea to make them mandatory
parameters; if somebody really wants to left them empty, she could pass "".
>>> + :timeout The timeout time in milliseconds since the display
>>> + of the notification at which the notification should
>>> + automatically close.
>>> + If -1, the notification's expiration time is dependent
>>> + on the notification server's settings, and may vary for
>>> + the type of notification (default).
>>> + If 0, the notification never expires.
>>
>> You might mention, that -1 is the default value.
>
> Well, it is mentionned but since you did not saw that, I modified the help.
Grrr. I need new glasses!
>> All of them are hints. If none of them is given, you get a D-Bus error, try
>>
>> (notifications-notify)
>>
>> This is because you initialize your `hints' variable as '(:array). If no
>> hint is given, you cannot pass it to `dbus-call-method' as such. You
>> must pass '(:array :signature "{sv}") as empty hint.
>
> I did not have any error, but well, I fixed it anyway.
Maybe you have disabled D-Bus error in one way or the other, I've got an
error. Did you run dbus-monitor in parallel, during tests?
>> I also propose to add the handling of the "NotificationClosed" and
>> "ActionInvoked" signals. This could be done by adding a callback
>> function to `notifications-notify'.
>
> That's clearly bonus, but added. :-)
It is more than just bonus. Otherwise, :actions could not be handled
properly.
Thanks for adding.
Best regards, Michael.
next prev parent reply other threads:[~2010-06-07 15:36 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-05 17:07 [PATCH] Add notifications.el Julien Danjou
2010-06-07 12:12 ` Michael Albinus
2010-06-07 13:31 ` Stefan Monnier
2010-06-07 15:17 ` Julien Danjou
2010-06-07 15:18 ` Julien Danjou
2010-06-07 15:36 ` Michael Albinus [this message]
2010-06-07 15:59 ` Julien Danjou
2010-06-07 22:28 ` Davis Herring
2010-06-08 8:08 ` Julien Danjou
2010-06-08 8:45 ` Julien Danjou
2010-06-08 12:42 ` Michael Albinus
2010-06-08 13:07 ` Julien Danjou
2010-06-10 23:16 ` Jan Moringen
2010-06-11 6:46 ` Julien Danjou
[not found] ` <3277_1276238795_o5B6kZER023748_87aar22hj1.fsf@keller.adm.naquadah.org>
2010-06-11 7:30 ` Jan Moringen
2010-06-11 9:15 ` Julien Danjou
2010-06-11 9:27 ` Jan Moringen
2010-06-11 10:25 ` Michael Albinus
2010-06-09 0:37 ` Stefan Monnier
2010-06-09 7:44 ` Michael Albinus
2010-06-09 18:18 ` Tassilo Horn
2010-06-09 18:53 ` Julien Danjou
2010-06-09 19:16 ` Tassilo Horn
2010-06-09 19:47 ` Julien Danjou
2010-06-09 20:10 ` Tassilo Horn
2010-06-09 20:39 ` Stefan Monnier
2010-06-09 20:58 ` Julien Danjou
2010-06-10 0:26 ` Stefan Monnier
2010-06-10 6:33 ` Tassilo Horn
2010-06-10 7:55 ` Julien Danjou
2010-06-10 8:26 ` Michael Albinus
2010-06-10 8:43 ` [PATCH] Passes notification id as argument of on-action and on-close functions Julien Danjou
2010-06-10 13:00 ` Michael Albinus
2010-06-10 13:08 ` Julien Danjou
2010-06-10 13:25 ` Michael Albinus
2010-06-10 15:20 ` Juri Linkov
2010-06-10 15:45 ` Michael Albinus
2010-06-10 16:56 ` Juri Linkov
2010-06-10 18:41 ` Michael Albinus
2010-06-10 18:53 ` Stefan Monnier
2010-06-10 20:23 ` Juri Linkov
2010-06-11 0:43 ` Stefan Monnier
2010-06-11 6:35 ` Daniel Pittman
2010-06-11 8:07 ` Juri Linkov
2010-06-11 13:20 ` Stefan Monnier
2010-06-11 8:06 ` Juri Linkov
2010-06-11 13:21 ` Stefan Monnier
2010-06-11 14:54 ` Chong Yidong
2010-06-11 15:51 ` Stefan Monnier
2010-06-11 19:14 ` Juri Linkov
2010-06-12 6:20 ` Dan Nicolaescu
2010-06-12 20:10 ` Juri Linkov
2010-06-12 20:49 ` Stefan Monnier
2010-06-14 15:51 ` Juri Linkov
2010-06-14 19:09 ` Stefan Monnier
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=nqocfm4zyz.fsf@alcatel-lucent.com \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=julien@danjou.info \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.