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

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

[elpa] externals/ement 0be192616e 1/7: Fix: (ement-notify-dbus-p) dbus-p


From: ELPA Syncer
Subject: [elpa] externals/ement 0be192616e 1/7: Fix: (ement-notify-dbus-p) dbus-ping with timeout
Date: Thu, 29 Sep 2022 13:57:43 -0400 (EDT)

branch: externals/ement
commit 0be192616e19dabd136f7c1efaeb59c2c7f26bd9
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Adam Porter <adam@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



reply via email to

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