Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
5 years, 9 months ago
In org-mode when a task is overrun - when the clocked time is bigger than the effort, there is a visual feedback in the mode-line. I am looking for a way to get an audible one as well.
I couldn't find
any hook for this event. As for the implementation of org-clock it appears to be only providing an extra string to display on the mode-line.
"Extra mode line text to indicate that the clock is overrun.
The can be nil to indicate that instead of adding text, the clock time
should get a different face (org-mode-line-clock-overrun').
When this is a string, it is prepended to the clock string as an indication,
also using the face org-mode-line-clock-overrun'." (from org-clock-task-overrun-text)
Has anyone managed to find a way to get an audio feedback when the clock has just overrun?
Aug 8, 2017 at 8:56
165 7 7 bronze badges
As Tyler's answer suggests,
org-clock-sound will help org to make an audible feedback for this scenario.
However, it is highly probable that lost in the init file there is this line of code
preventing this feedback to happen:
(setq ring-bell-function 'ignore)
Make sure to
not have set to ignore
ring-bell-function or that you have
provided a function like this:
(setq ring-bell-function (lambda ()
(from emacsWiki alarm bell) Set the
t or your favorite sound
see this answer for examples.
If you happen to be on a emacs version without the sound binaries on OSX, you may want to look at
https://github.com/leoliu/play-sound-osx for a quick fix.
Aug 11, 2017 at 9:05
165 7 7 bronze badges
org-clock-notify-once-if-expired appears to play a sound, if you have a sound configured in the variable
org-clock-sound. That would give you a single audible notification after you first go over-time on a task:
(if (setq org-clock-task-overrun
(if (or (null effort-in-minutes) (zerop effort-in-minutes))
(>= clocked-time effort-in-minutes)))
(setq org-clock-notification-was-shown t)
(format-message "Task `%s' should be finished by now. (%s)"
Aug 8, 2017 at 12:59
21.4k 1 1 gold badge 50 50 silver badges 90 90 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only