Home > English, Erlang > Erlang Emacs mode

Erlang Emacs mode

When I code erlang I use Eclipse with the plugin Erlide or Emacs with the erlang mode enabled.

Setting Erlide is really easy, but with Emacs if may be not trivial specially if you want to do it on Windows, anyway Erlang guys put online a good tutorial on how to set your environment.

I am using R13B04 and windows 7, here are the steps to set your environment:

    1. set in your environment the system variable HOME with the path of your emacs installation directory
    2. create inside that directory a .emacs.d directory
    3. create in the previous directory a file named init.el with the following lines (changing <Ver> and <ToolsVer> with your values. Please note that this file must be a .el file, so if you use Notepad double check that you are not saving it as a .txt file
(setq load-path (cons  "C:/Program Files/erl<Ver>/lib/tools-<ToolsVer>/emacs"
      (setq erlang-root-dir "C:/Program Files/erl<Ver>")
      (setq exec-path (cons "C:/Program Files/erl<Ver>/bin" exec-path))
      (require 'erlang-start)
  1. restart your computer (if you set up the system variable for the first time)
  2. try to use emacs and edit an erlang file…you should have a nice indentation, color and some useful feature under the menu Erlang
  3. It is known (see this) that in this version of erlang a file is missing inside tools-<ToolVer>/emacs, this file is erlang-skels.el and you can find it here. Notice that the last link may be broken in the future, so in case just search for erlang.skels.el in the Internet.

Emacs is cooooool!

Categories: English, Erlang Tags: ,
  1. May 22, 2010 at 10:24 am

    i would like to use erlide and emacs, too. but i just can’t remember all the keyboard shortcuts and if something wrong pops up… i am totally lost in emacs. 😦 so i use vim for erlang programming, there’s a nice set of plugins and autocompletion is also possible: http://bytefish.de/public/doku.php?id=blog:erlang_autocompletion_in_vim.

    • pdincau
      May 22, 2010 at 2:12 pm

      NIce of you to post a guide to vim, actually i used it as well on remote..i can provide you tips and a survival guide to emacs if you want!

  2. Justin
    October 22, 2011 at 7:57 pm

    Thanks. Just starting out with emacs and needed erlang-skels.el to get Erlang support. Erlide is great too (but Eclipse is hanging/crashing on me sometimes since i installed Erlide…)

  1. November 28, 2012 at 8:00 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: