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).
4 replies on “Prepare your tea with Emacs”
This will fit into my morning schedule perfectly. I use Emacs to program daily on a MacBook Pro. I also drink hot tea every morning and afternoon and enjoy a variety of teas. Thanks for this, and for the additional Mac instructions!
I have exactly the same routine 🙂 Glad you like it.
What’s your favorite morning tea?
This amuses me, I was faffing about trying to find a non-desktop-environment tea timer, but then realized I’m a programmer, so I should just do it myself. The solution I settled on was a bash script that waits the appointed amount of time then throws a xmessage window up that lets me know my tea is ready.
Excellent, just after emacs identica-mode, saw this, I was looking forsomething like this at the same time. Wihlem’s scream is excellent with it !