Reputation: 3
I had checked the doc of erlang-mode.
it's seem that C-c C-k, (erlang-compile) - Compiles the Erlang module in the current buffer.
just compile one file of current buffer. I wanna compile a project with rebar commond on emacs. eg. ./rebar compile
and it can display result like execute "erl -sname -pa ebin -pa deps/*/ebin".
how to do this on emacs?
Upvotes: 0
Views: 602
Reputation: 20004
Doing this the "right" way involves inferior emacs shells and such, and isn't trivial. But you can mostly get the desired effect with these two steps:
rebar.config
file, execute M-x compile
and after hitting enter, change the compile command to rebar get-deps compile
, then hit enter to run it.Assuming the compilation in the first step succeeds, execute C-u M-x erlang-shell
and hit enter. It will prompt you for the shell arguments, which should be
erl -pa deps/*/ebin -pa ebin
Hit enter and you'll get an erlang shell prompt, with its erlang load path properly set up for your project.
Upvotes: 2