From f19880a641e323b1db9a19a98b7cbe5bfd694be5 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 9 Jul 2026 19:58:27 -0500 Subject: fix: guard each event's alert call chime--process-notifications maps chime--notify over every due event, and the alert call was unguarded. One dbus error partway through dropped every notification after it, and the caller's condition-case then miscounted the whole thing as a fetch failure, walking the counter toward the persistent-failure warning. Each event's alert now fails on its own and reports to *Messages*. --- chime.el | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'chime.el') diff --git a/chime.el b/chime.el index 56fd9d1..66190c8 100644 --- a/chime.el +++ b/chime.el @@ -1982,14 +1982,22 @@ notification text and SEVERITY is one of high, medium, or low." (severity (if (consp msg-severity) (cdr msg-severity) 'medium))) ;; Play sound if a file is configured (set chime-sound-file to nil to disable) (chime--play-sound) - ;; Show visual notification - (apply - 'alert event-msg - :icon chime-notification-icon - :title chime-notification-title - :severity severity - :category 'chime - chime-extra-alert-plist))) + ;; Show visual notification. `chime--process-notifications' maps this + ;; over every due event, so an alert that signals -- a dbus error, a + ;; misbehaving notification daemon -- would drop every notification + ;; after it and be miscounted as a fetch failure by the caller's + ;; condition-case. Guard each event's alert on its own. + (condition-case err + (apply + 'alert event-msg + :icon chime-notification-icon + :title chime-notification-title + :severity severity + :category 'chime + chime-extra-alert-plist) + (error + (message "chime: Failed to show notification: %s" + (error-message-string err)))))) ;;;; Timestamp Parsing -- cgit v1.2.3