branch: externals/tmr
commit d6d5e4d22da9f6f52b6a868bb6e7aea65ac6b46f
Author: Daniel Mendler <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
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