Backport commit 4f714dc08 from Emacs
* lisp/org-clock.el (haiku-notifications-notify): Correct file name in function declaration. (android-notifications-notify): New declaration. (org-show-notification): Use `android-notifications-notify'. Support desktop notifications on Android 4f714dc08137d36d0d1e886814008f2abe5712c0 Po Lu Sun Aug 20 20:25:53 2023 +0800
This commit is contained in:
parent
d5925e3e70
commit
a7c8c9d8c2
|
@ -51,7 +51,8 @@
|
||||||
(declare-function org-dynamic-block-define "org" (type func))
|
(declare-function org-dynamic-block-define "org" (type func))
|
||||||
(declare-function w32-notification-notify "w32fns.c" (&rest params))
|
(declare-function w32-notification-notify "w32fns.c" (&rest params))
|
||||||
(declare-function w32-notification-close "w32fns.c" (&rest params))
|
(declare-function w32-notification-close "w32fns.c" (&rest params))
|
||||||
(declare-function haiku-notifications-notify "haikufns.c")
|
(declare-function haiku-notifications-notify "haikuselect.c")
|
||||||
|
(declare-function android-notifications-notify "androidselect.c")
|
||||||
|
|
||||||
(defvar org-frame-title-format-backup nil)
|
(defvar org-frame-title-format-backup nil)
|
||||||
(defvar org-state)
|
(defvar org-state)
|
||||||
|
@ -861,6 +862,13 @@ use libnotify if available, or fall back on a message."
|
||||||
(haiku-notifications-notify :title "Org mode message"
|
(haiku-notifications-notify :title "Org mode message"
|
||||||
:body notification
|
:body notification
|
||||||
:urgency 'low))
|
:urgency 'low))
|
||||||
|
((fboundp 'android-notifications-notify)
|
||||||
|
;; N.B. timeouts are not available under Haiku or Android.
|
||||||
|
(android-notifications-notify :title "Org mode message"
|
||||||
|
:body notification
|
||||||
|
;; Low urgency notifications
|
||||||
|
;; are by default hidden.
|
||||||
|
:urgency 'normal))
|
||||||
((fboundp 'w32-notification-notify)
|
((fboundp 'w32-notification-notify)
|
||||||
(let ((id (w32-notification-notify
|
(let ((id (w32-notification-notify
|
||||||
:title "Org mode message"
|
:title "Org mode message"
|
||||||
|
|
Loading…
Reference in New Issue