branch: externals/ement commit 0be192616e19dabd136f7c1efaeb59c2c7f26bd9 Author: Tassilo Horn <t...@gnu.org> Commit: Adam Porter <a...@alphapapa.net>
Fix: (ement-notify-dbus-p) dbus-ping with timeout Use a 2000ms timeout instead of the standard 25 seconds so that loading ement-notify.el doesn't stall for ages when something DBUS is wonky. --- ement-notify.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ement-notify.el b/ement-notify.el index 8faf18b9b2..b73eb605b9 100644 --- a/ement-notify.el +++ b/ement-notify.el @@ -52,7 +52,10 @@ (and (featurep 'dbusbind) (require 'dbus nil :no-error) (dbus-ignore-errors (dbus-get-unique-name :session)) - (dbus-ping :session "org.freedesktop.Notifications")) + ;; By default, emacs waits up to 25 seconds for a PONG. Realistically, if there's + ;; no pong after 2000ms, there's pretty sure no notification service connected or + ;; the system's setup has issues. + (dbus-ping :session "org.freedesktop.Notifications" 2000)) "Whether D-Bus notifications are usable.") ;;;; Customization