From ef8d5819b3cab677828e2ac21e780c78227acedb Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 5 May 2026 12:23:29 -0500 Subject: refactor!: drop chime-play-sound, use chime-sound-file = nil to disable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `chime-play-sound' was redundant with `chime-sound-file' — both had to be truthy for sound to play, and `chime-sound-file' already documented "set to nil to disable sound completely". Two knobs for one decision is a trap. I removed the defcustom and the `(when chime-play-sound ...)' guard in `chime--notify' (it now just checks `chime-sound-file'). Tests, README quick-start, and the troubleshooting checklist all reference the new single-knob form. One redundant test (sound-disabled-via-the-toggle) got dropped because it now duplicates the sound-file-nil case. Breaking change: users with `(setq chime-play-sound nil)' in their config will get a void-variable warning at customize time and lose their disable. Migration: `(setq chime-sound-file nil)'. --- README.org | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'README.org') diff --git a/README.org b/README.org index 6191078..258cabc 100644 --- a/README.org +++ b/README.org @@ -68,8 +68,8 @@ The quickest way to try it out: ;; Notify 5 minutes before (medium urgency) and at event time (high urgency) (setq chime-alert-intervals '((5 . medium) (0 . high))) - ;; Chime sound - (setq chime-play-sound t) + ;; Chime sound (set to nil to disable, or to a path for a custom sound) + ;; (setq chime-sound-file nil) ;; Modeline display (see "Modeline Display" section for more options) (setq chime-enable-modeline t) @@ -211,8 +211,8 @@ Severity levels (=high=, =medium=, =low=) are passed to [[https://github.com/jwi Control the audible chime that plays when notifications appear: #+BEGIN_SRC elisp - ;; Enable/disable the bundled chime sound (default: t) - (setq chime-play-sound t) + ;; Disable sound entirely + (setq chime-sound-file nil) ;; Use your own custom sound file (setq chime-sound-file "/path/to/your/chime.wav") @@ -826,9 +826,8 @@ If you have custom variables that need to be available in chime's async subproce ;; Alert intervals: 5 minutes before (medium) and at event time (high) (setq chime-alert-intervals '((5 . medium) (0 . high))) - ;; Chime sound - (setq chime-play-sound t) - ;; Uses bundled chime.wav by default + ;; Chime sound — uses bundled chime.wav by default + ;; (setq chime-sound-file nil) to disable ;; Modeline display - compact format (setq chime-enable-modeline t) @@ -1033,7 +1032,7 @@ It also monitors event loading timing and async process performance in the backg *** No Sound Playing -1. Verify sound is enabled: =M-: chime-play-sound= should return =t= +1. Verify a sound file is configured: =M-: chime-sound-file= should return a path (not nil) 2. Check sound file exists: =M-: (file-exists-p chime-sound-file)= 3. Test sound directly: =M-: (play-sound-file chime-sound-file)= 4. Ensure your system has audio support configured -- cgit v1.2.3