org-clock.el: Make org-notify support macOS notification

* lisp/org-clock.el (org-show-notification): Add support for macOS
notification.
This commit is contained in:
stardiviner 2021-07-04 08:13:43 +08:00 committed by Bastien
parent 4b7d80cb60
commit b80b0a517d
1 changed files with 4 additions and 0 deletions

View File

@ -859,6 +859,10 @@ use libnotify if available, or fall back on a message."
org-show-notification-timeout
nil
(lambda () (w32-notification-close id)))))
((fboundp 'ns-do-applescript)
(ns-do-applescript
(format "display notification \"%s\" with title \"Org mode notification\""
(replace-regexp-in-string "\"" "#" notification))))
((fboundp 'notifications-notify)
(notifications-notify
:title "Org mode message"