I am running Emacs 26.1 on MacOs Mojave and have problem to play sounds with pomidor:

pomidor is installed in ~/.emacs.d/elpa/pomidor-20180614.828

Reference to the source code pomidor.el, it warn that (warn "This Emacs binary lacks sound support")))

 120 (defun pomidor-play-sound-file-emacs (file)                                                                                                                     
 121   "Play FILE by starting new Emacs process."                                                                                                                    
 122   (if (fboundp 'play-sound-internal)                                                                                                                            
 123       (start-process "pomidor-play-sound-file-emacs"                                                                                                            
 124                      nil                                                                                                                                        
 125                      (car command-line-args)                                                                                                                    
 126                      "-Q"                                                                                                                                       
 127                      "--batch"                                                                                                                                  
 128                      "--eval" (format "(play-sound-file \"%s\")" file))                                                                                         
 129     (warn "This Emacs binary lacks sound support")))                                                                                                            

Since it fails to play sounds, I config the ~/.emacs.d/init.el following the instruction TatriX/pomidor: Pomidor is a simple and cool pomodoro technique timer.

1, To disable or configure sounds:

(setq pomidor-sound-tick nil
      pomidor-sound-tack nil
      pomidor-sound-overwork (expand-file-name (concat pomidor-dir "overwork.wav"))
      pomidor-sound-break-over (expand-file-name (concat (getenv "HOME") "/Music/overwork.wav")))

and place the sounds to Musics directory

$ ls ~/Music
iTunes  overwork.wav  tack.wav  tick.wav

When restart emacs it prompts:

Symbol's value as variable is void: pomidor-dir
pomidor.el reside in:
$ pwd ; tree 
├── overwork.wav
├── pomidor-autoloads.el
├── pomidor-pkg.el
├── pomidor.el
├── pomidor.elc
├── tack.wav
└── tick.wav

2, Provide customized function to play sounds

if your Emacs can't play sounds you can provide your own function to do it:

(setq pomidor-play-sound-file
      (lambda (file)
        (start-process "my-pomidor-play-sound"

I wait 2 hours to run 3 pomodoros, but it stayed mute.

I checked the problem and find there is not such a function called "my-pomidor-play-sound" in pomidor.el.

$ grep -n 'my-pomidor' pomidor.el
#return nothing
$ grep -n 'pomidor-play' pomidor.el
120:(defun pomidor-play-sound-file-emacs (file)
123:      (start-process "pomidor-play-sound-file-emacs"
131:(defcustom pomidor-play-sound-file #'pomidor-play-sound-file-emacs ;;
329:  "Play FILE using `pomidor-play-sound-file' function if any."
330:  (when (and file (functionp pomidor-play-sound-file))
331:    (funcall pomidor-play-sound-file file)))

It comes to conclusion that I should write a defun my-pomidor-play-sound then could start-process

Alternatively, I found a solution org mode - Play Org-Pomodoro sounds - Emacs Stack Exchange

Which simple introduce M-x package install sound-wav.

Unfortunately, the pomidor keeps mute.

How could I get it playing sounds?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.