Mr. X
Mr. X

Reputation: 201

Setting up Emacs for programming Erlang

Emacs is the IDE of choice for programming Erlang.

There are plenty of good modes (distel, erlware-mode, the default erlang mode,...), but what are your recommendations for setting up Emacs for professional Erlang development?

Upvotes: 20

Views: 9349

Answers (6)

nic ferrier
nic ferrier

Reputation: 1660

I've found erlang-mode ok but it doesn't support kerl (which is a useful thing, kinda like rvm for erlang, except it works).

So I started this:

https://github.com/nicferrier/emacs-erlang-extras

which supports multiple erlangs.

I'm intending that it will support rebar as well:

https://github.com/rebar/rebar/wiki/Getting-started

Upvotes: 3

legoscia
legoscia

Reputation: 41618

Set up erlang-mode as described in the README, and then activate Flymake:

(require 'erlang-flymake)

That gives you highlighting of warnings and errors as you type.

I'd recommend using erlang-mode from the latest Erlang/OTP release (R14A as I type this), regardless of what release you normally use, as it evolves quite rapidly and is now just as good as erlware-mode, IMHO.

If you're using Emacs 24 or later, I recommend installing erlang-mode from MELPA. The 'erlang' package tracks the 'maint' branch of the Erlang/OTP Git repository, so it is always reasonably up-to-date.

Upvotes: 8

legoscia
legoscia

Reputation: 41618

If you want more than erlang-mode offers, a possible alternative to Distel is EDTS, the Erlang Development Tool Suite. To quote the readme file:

EDTS is meant to be a able to replace Distel but only provides part of the most commonly used of Distel's features, specifically the equivalents of erl-find-module, erl-find-source-under-point, erl-who-calls and erl-refactor-subfunction. As far as I know, those are the only Distel features that 98% of people use, but if there is anything from Distel that you are missing in EDTS, please let me know.

If you are using EDTS, please remove Distel from your configuration, since running both can create some confusion.

Upvotes: 6

Alex Ott
Alex Ott

Reputation: 87249

Look onto this article about different packages for work with Erlang from Emacs. I personally use erlware-mode + distel

Upvotes: 4

0xYUANTI
0xYUANTI

Reputation: 404

erlang.el (for indentation and font-locking) and Distel (debugger, M-. etc.) are essential. ESense, I've never used, and I've no idea what the erlware mode does. You may want to use some of the standard Emacs utilities (flymake, interface to version control, and so forth) when writing Erlang.

Upvotes: 3

mathk
mathk

Reputation: 8143

I found out ESense on emacswiki. Might worth a try.

Upvotes: 2

Related Questions