aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-09 19:58:27 -0500
committerCraig Jennings <c@cjennings.net>2026-07-09 19:58:27 -0500
commitf19880a641e323b1db9a19a98b7cbe5bfd694be5 (patch)
treef449ef5f899083fe907d1415a4bb739e63c7ad3c
parent032ba26f7504a7a10f532f345d3d5f183c171fe7 (diff)
downloadchime-f19880a641e323b1db9a19a98b7cbe5bfd694be5.tar.gz
chime-f19880a641e323b1db9a19a98b7cbe5bfd694be5.zip
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*.
-rw-r--r--chime.el24
1 files changed, 16 insertions, 8 deletions
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