emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/tmr d6d5e4d22d 05/14: Warn if dbus is unavailable


From: ELPA Syncer
Subject: [elpa] externals/tmr d6d5e4d22d 05/14: Warn if dbus is unavailable
Date: Mon, 27 Jun 2022 12:58:04 -0400 (EDT)

branch: externals/tmr
commit d6d5e4d22da9f6f52b6a868bb6e7aea65ac6b46f
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Warn if dbus is unavailable
---
 tmr-notification.el | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/tmr-notification.el b/tmr-notification.el
index 43dce3a3c7..61a4ff759b 100644
--- a/tmr-notification.el
+++ b/tmr-notification.el
@@ -58,14 +58,16 @@ such notifications."
   "Dispatch a notification for TIMER.
 
 Read: (info \"(elisp) Desktop Notifications\") for details."
-  (let ((title "TMR May Ring (Emacs tmr package)")
-        (body (tmr--long-description-for-completed-timer timer)))
-    (notifications-notify
-     :title title
-     :body body
-     :app-name "GNU Emacs"
-     :urgency tmr-notification-urgency
-     :sound-file tmr-sound-file)))
+  (if (featurep 'dbusbind)
+      (let ((title "TMR May Ring (Emacs tmr package)")
+            (body (tmr--long-description-for-completed-timer timer)))
+        (notifications-notify
+         :title title
+         :body body
+         :app-name "GNU Emacs"
+         :urgency tmr-notification-urgency
+         :sound-file tmr-sound-file))
+    (warn "Emacs has no DBUS support, TMR notifications unavailable")))
 
 (provide 'tmr-notification)
 ;;; tmr-notification.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]