Categories
Emacs GNU/Linux Free Software & Open Source

Prepare your tea with Emacs

Jazmin and Dragon Well Tea

I love tea. I’m not a coffee drinker, so I get my morning boost from severl kind of teas. I use black teas from Teavana and green teas from a little shop in chinatown San Francisco called Ten Ren Tea. And I recently discovered that mate and black teas are a great energy booster combination!

Anyways, the point is that I make several teas at the office, and I always have to be watching carefully the stopwatch on my phone or set an alarm on it to know when my tea is ready.

A few months ago I found out about Emacs tea-time mode. It sets a timer then plays a sound and show a message to let you know when your tea is ready. So now you can make my teas with the help of Emacs!

At work I use a Macbook Pro, and the original code was very GNU/Linux specific. So I modified Konstantin Antipin’s tea-time mode to make it more platform independent and configurable.

You can grab my fork of tea-time mode (at least until my patches are accepted) from https://github.com/gabrielsaldana/tea-time save it on your elisp load-path (typically at the ~/.emacs.d/ folder) and add this to your .emacs initialization file:

(require 'tea-time) (setq tea-time-sound "path-to-sound-file")

Now you can configure which program to use as player for the alarm sound.

If you’re using a Mac and Emacs for Mac OS X, sound support is not available by default; You’ll need to run a shell command. In Mac, the default player can be set as:

(setq tea-time-sound-command "afplay %s")

On GNU/Linux, you don’t need to configure this as it will fall back to default sound engine configured (alsa, pulseaudio, etc).