(substring (org-timer-value-string) 0 -1)If trying to play a sound from Emacs, e.g. via play-sound-file
or org-notify
only gives you a puny beep, and sometimes the error message “This Emacs binary lacks sound support”, add the following to your init.el
:
;; on macos, fix "This Emacs binary lacks sound support"
;; - https://github.com/leoliu/play-sound-osx/blob/master/play-sound.el
;; - update according to https://github.com/leoliu/play-sound-osx/issues/2#issuecomment-1088360638
(when (eq system-type 'darwin)
(unless (and (fboundp 'play-sound-internal)
(subrp (symbol-function 'play-sound-internal)))
(defun play-sound-internal (sound)
"Internal function for `play-sound' (which see)."
(or (eq (car-safe sound) 'sound)
(signal 'wrong-type-argument (list sound)))
(cl-destructuring-bind (&key file data volume device)
(cdr sound)
(and (or data device)
(error "DATA and DEVICE arg not supported"))
(apply #'start-process "afplay" nil
"afplay" (append (and volume (list "-v" volume))
(list (expand-file-name file data-directory))))))))
This is just an updated and mashed up version of https://github.com/leoliu/play-sound-osx