Quellcode durchsuchen

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.
`----
Bastien Guerry vor 14 Jahren
Ursprung
Commit
fea907285c
1 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen
  1. 7 0
      lisp/org-clock.el

+ 7 - 0
lisp/org-clock.el

@@ -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))