org-show-notification: use notifications.el when available.

notifications.el is a new package from Julien Danjou, available
in Emacs 24.1.  From etc/NEWS:

,----
| ** notifications.el provides an implementation of the Desktop
| Notifications API.  It requires D-Bus for communication.
`----
This commit is contained in:
Bastien Guerry 2010-09-02 23:51:22 +02:00
parent 58a49d1739
commit fea907285c
1 changed files with 7 additions and 0 deletions

View File

@ -557,6 +557,13 @@ use libnotify if available, or fall back on a message."
((stringp org-show-notification-handler)
(start-process "emacs-timer-notification" nil
org-show-notification-handler notification))
((featurep 'notifications)
(notifications-notify
:title "Org-mode message"
:body notification
;; FIXME how to link to the Org icon?
;; :app-icon "~/.emacs.d/icons/mail.png"
:urgency 'low))
((org-program-exists "notify-send")
(start-process "emacs-timer-notification" nil
"notify-send" notification))