summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2020-01-26 16:49:11 +0100
committerBastien <bzg@gnu.org>2020-01-26 16:49:11 +0100
commita3c373a1bf65c29f2d74a4b401844f099de4253f (patch)
treed0ee252db2b430addea3171965357b5ad6068831
parent3399918691984e15a611e87f8ab769e0d266c388 (diff)
downloadorg-mode-a3c373a1bf65c29f2d74a4b401844f099de4253f.tar.gz
org-clock.el: Explicitely require 'notifications
* lisp/org-clock.el (org-show-notification): Explicitely require 'notifications and remove w32-related code.
-rw-r--r--lisp/org-clock.el6
1 files changed, 1 insertions, 5 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 1e35567..a95c854 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -808,6 +808,7 @@ If PLAY-SOUND is non-nil, it overrides `org-clock-sound'."
"Show notification.
Use `org-show-notification-handler' if defined,
use libnotify if available, or fall back on a message."
+ (ignore-errors (require 'notifications))
(cond ((functionp org-show-notification-handler)
(funcall org-show-notification-handler notification))
((stringp org-show-notification-handler)
@@ -823,11 +824,6 @@ use libnotify if available, or fall back on a message."
((executable-find "notify-send")
(start-process "emacs-timer-notification" nil
"notify-send" notification))
- ((string-equal system-type "windows-nt")
- (w32-notification-close (w32-notification-notify
- :title "Org mode message"
- :body notification
- :urgency 'low)))
;; Maybe the handler will send a message, so only use message as
;; a fall back option
(t (message "%s" notification))))