Configuring Emacs for Erlang

Posted: May 24th, 2008 | Author: kevin | Filed under: Business, Erlang, Screencast | View Comments

Inspired by this post from Ola Bini I decided to take a stab at cleaning up my Emacs configuration.

At the same time I’ve been working on a series of technical screencasts for a client who shall remain nameless, at least for now. I thought a ‘cast covering Emacs configuration would fit nicely with the other ones I had produced for this client so I recorded one. Afterwards, the client and I decided that it wasn’t a good fit after all.

Which left me with a decent screencast just sitting on my hard drive. Rather than delete it or let it collect dust, I’ve decided to share it in the hopes someone will find it useful.

The screencast covers configuring Aquamacs Emacs to use the Erlang Emacs mode which ships with the Erlang standard “distribution” and configuring flymake to provided almost real-time syntax checking. The footage is a little rough but usable.

The screencast is available in QuickTime format here. A zip archive of the final configuration built during the screencast is available here. I make reference to URLs contained in the session notes — these notes do not exist. Instead, here are the URLs:

Flymake download: http://cvs.savannah.gnu.org/viewvc/*checkout*/emacs/emacs/lisp/progmodes/flymake.el?revision=1.2.4.33

Erlang mode docs: http://www.erlang.org/doc/man/erlang_mode.html

Edit: 24 hours have passed and it seems I need to clarify a few things:

  1. I’ve created a new version of the video available here. I’m not sure why some people have problems playing the first video but the second version seems to work a bit better.
  2. I don’t like YouTube for screencasts which have lots of text. The resolution is too low and the text looks like blurry crap.
  3. And yes—I completely borked the factorial function. In my defense, I’ve been getting less than 5 hours of sleep per night for the past couple of weeks. I’ve been insanely busy which has made sleep a bit more optional than I’d like. Let this be an object lesson to you youngins who think they can get by on hardly any sleep for weeks on end. With enough sleep deprivation you too can embarrass yourself in front of the Internet. Yay.

7/28/08 Update: Ogg-encoded version of this screencast is available here. Tested using VLC on recent versions of OS X and Fedora, it should be viewable by anyone having problems with the QuickTime movies.


  • David Cabana
    I had not tried flymake before; it's pretty sweet. Your instructions made it easy to get flymake and erlang-mode working together. Thanks.
  • Yes, I know about distel. It's sufficiently complex it warrants an entire screencast on its own. The intent of the screencast was to provide a basic editing environment for developers new to Emacs and Erlang. Personally, I use (and love) Distel for my coding but I thought trying to cover Distel, the Erlang mode, and flymake would make the screencast too long.

    Basically, if you already know about Distel you're probably not in the target market for this screencast :)
  • mcgyver
    Check out Distel: http://code.google.com/p/distel/

    Its an extension to the erlang-mode.

    btw. Video neither works with VLC nor MPlayer on OS X. Couldn't you just upload it to youtube?
  • Duc
    You messed up the factorial function :)
  • New version of the video works beautifully. Thanks!
  • Chris
    um, factorial(X) is
    X * factorial (X -1)

    not

    X + factorial (X -1)....

    I'm sure it's just a slip of the finger :)
  • Had you not tried to use distel (http://fresh.homeunix.net/~luke/distel/) for work with erlang? it seems to has more features than erlang-mode
  • Hmm. I've remastered a new version and updated the post. Could you try the new file and see if that works any better? Thanks for pointing this out -- who knows how many other people have had this problem. . . *sigh*
  • Hey, the video is not playing at all in QuickTime on my Mac, and only playing the sound without the video in VLC, again on my Mac. I've tried multiple downloads with the same result. Any chance there was an upload error or an encoding problem? Got an MPEG-4 version running around up there?
blog comments powered by Disqus