[erlang-questions] Emacs Erlang mode: how to compile properly?

jla415 jla415@REDACTED
Sun Jul 1 03:21:10 CEST 2007



Denys Rtveliashvili wrote:
> 
> - As for Erlang, I can create a makefile and re-run the program every 
> time I change and rebuild it, but it look like the development process 
> should be similar to the one in LISP. I see that it is possible to 
> connect to Erlang machine (at least by using  Distel) and do something 
> in it.
> However:
> * I do not see any way to "rebuild" the whole project and refresh the 
> code in virtual machine from Emacs. Is this functionality available?
> * The Ctrl-C Ctrl-K combination does re-compile the currently opened 
> document. However, it does so only if all the dependencies are on the 
> system path or in the current directory. Which is usually not true, as 
> Erlang projects tend to have .erl files in "src" directory and ".hrl" in 
> "include". So, when I try to compile an Erlang source code from within 
> Emacs it does not do so because it can't find .erl files (which are in 
> ../include).
> 
> I hope, there is a description of the development process somewhere. 
> Could someone give me a link or write a few words about it?
> 
> 
> 


Lately I've been developing in emacs with distel using the following
keybinds:


(add-hook 'erlang-mode-hook 'my-erl-binds)
(defun my-erl-binds ()
  (define-key erlang-mode-map [f5] 
    (lambda () 
      (interactive) 
      (progn 
	(save-buffer) 
	(compile "make -k"))))
  (define-key erlang-mode-map [f6] 'erl-reload-modules)))

f5 saves the current buffer, runs make to compile the sources, then f6
reloads all the modified modules in whatever erlang node distel is currently
connected to.

-- 
View this message in context: http://www.nabble.com/Emacs-Erlang-mode%3A-how-to-compile-properly--tf4005548.html#a11378448
Sent from the Erlang Questions mailing list archive at Nabble.com.




More information about the erlang-questions mailing list