4536579739_230d9e40fa_m
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).

About the author

Gabriel Saldaña Gabriel Saldaña is a web developer, photographer and free software advocate. Connect with him on and Twitter

Creative Commons License
Prepare your tea with Emacs by Gabriel Saldaña, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 2.5 Mexico License.

Standard

4 thoughts on “Prepare your tea with Emacs

  1. Brian Zwahr says:

    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!

  2. Kevin Granade says:

    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.

  3. franckbenoit says:

    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 !

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>