branch: externals/tmr commit d7e57fdf22bc58e3bc69db78b69795aa503a3870 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make tmr-sound-play not throw an error and return nil if ffplay is missing We do not want to make ffplay a hard dependency of tmr. What it provides is not essential, though it is nice to have. --- tmr.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tmr.el b/tmr.el index 1fb0e8c403..778f1e8c13 100644 --- a/tmr.el +++ b/tmr.el @@ -551,10 +551,9 @@ Read Info node `(elisp) Desktop Notifications' for details." (defun tmr-sound-play (&optional _timer) "Play `tmr-sound-file' using the ffplay executable (ffmpeg). TIMER is unused." - (when-let* ((sound (expand-file-name tmr-sound-file)) + (when-let* ((_ (executable-find "ffplay")) + (sound (expand-file-name tmr-sound-file)) ((file-exists-p sound))) - (unless (executable-find "ffplay") - (user-error "Cannot play %s without `ffplay'" sound)) (call-process "ffplay" nil 0 nil "-nodisp" "-autoexit" sound))) (defun tmr-print-message-for-created-timer (timer)