It's been a while since I touched it, so I figured I'd download the Erlang reference and language implementation and play around with it. This is also the first time I've played with it while being an admitted Emacs user though1.

Sounds like a good time to get Erlang mode running inside Emacs rather than having to muck around with erl in the terminal. A search for "erlang mode emacs" links me to the Erlang/OTP site where I found the documentation earlier. Turns out that Erlang comes with its own Emacs mode. I guess the guys and gals over at Ericsson labs are all Emacs hackers too2.

Anyway, it turns out that all you really need to do is install Erlang, then add /usr/lib/erlang/lib/tools-[version number]/emacs to your load path, and

elsewhere in your .emacs file. Note that you'll need to change those directories based on where you installed Erlang. The above are what I had to do after running apt-get install erlang. If you did yours manually, it'll be different.

Once that's done, M-x erlang-mode gets you the right mode, and M-x erlang-shell gets the current buffer running erl.

As an aside, I also found one post from a user who highly recommended the Erlang emacs mode, even to users of other editors. His advice ran something like "What you'll want to do is type $> vim ~/.emacs and edit that file to include your Erlang path". I found it chuckle-worthy, at least.↩