<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 5, 2014 at 4:37 AM, t x <span dir="ltr"><<a href="mailto:txrev319@gmail.com" target="_blank">txrev319@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
<br>
Given:<br>
<br>
  machine name: server<br>
  user account: x<br>
<br>
  x@server$ erl -sname gandalf<br>
  ## we now have an erl running<br>
<br>
<br>
Question:<br>
<br>
  Now, from emacs, how do I tell emacs "connect a repl to the node<br>
with sname gandalf" instead of "fire up a new session of erl" ?</blockquote><div><br></div><div>If you give a prefix arg to erlang-shell, it reads arguments from the minibuffer. The tricky part is that you also have to set the TERM env var. So, if you type</div>
<div><br></div><div>C-u M-x erlang-shell</div><div><br></div><div>you'll be prompted with "Erlang command: " to enter the erlang shell command. At the prompt enter something like the following:</div><div><br>
</div><div>erl -sname bilbo -remsh gandalf@server -env TERM vt100</div><div><br></div><div>The "-env TERM vt100" part is very important, since if you leave it off, the new node will start just fine but will silently fail to connect to the other node.</div>
<div><br></div><div>--steve</div></div></div></div>