From a7c8c9d8c261772491ab36b6427f9b14cfbe6148 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 20 Aug 2023 20:23:56 +0800 Subject: [PATCH] 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 --- lisp/org-clock.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 3f534483b..da40a4e04 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -51,7 +51,8 @@ (declare-function org-dynamic-block-define "org" (type func)) (declare-function w32-notification-notify "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-state) @@ -861,6 +862,13 @@ use libnotify if available, or fall back on a message." (haiku-notifications-notify :title "Org mode message" :body notification :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) (let ((id (w32-notification-notify :title "Org mode message"