[freebsd] new erlang related packages

Luke Gorrie <>
Mon Nov 18 11:20:07 CET 2002


Marc Ernst Eddy van Woerkom <> writes:

> >   But -don't kick me- when I get asked for an Erlang node
> >   name after hitting C-c C-d l, what am I supposed to
> >   answer? localhost gives an error.

I see you've already figured this out, but anyway - you should give an
Erlang node name - the same name that "node()" returns on the node you
want to connect to.

If you give just a name with no host (like "foo" instead of
""), then the name of the local machine is automatically added
on.

> >   Do I have to fire up an erlang shell before?
> 
> OK, I tried
> 
>   $ erl -name test
>   Erlang (BEAM) emulator version 5.2 [source] [hipe] [threads:0]
> 
>   Eshell V5.2  (abort with ^G)
>   ()1>
> 
> And in Emacs C-c C-d l and then ""
> as node name. Note that my home system is only connected
> via ppp to the net, not having a real domain (something
> resolvable by DNS).
> 
> This seems to fail:
> 
>   >> REG_SEND: [TYPE erl-pid  14 0 0] rex [[TYPE erl-pid  14 0 0] [call distel rpc_entry (distel process_list nil) [TYPE erl-pid  1 0 0]]]
>   << SEND: [TYPE erl-pid  14 0 0] [rex [badrpc [EXIT [undef ([distel rpc_entry (distel process_list nil)] [rpc -handle_call/3-fun-0- 6])]]]]
> 
> Any ideas?

Ok, this is not so readable, but it is actually a Lisp'ification of an
Erlang EXIT signal. The important part is:

  [badrpc [EXIT [undef ([distel rpc_entry (distel process_list nil)]
                        [rpc -handle_call/3-fun-0- 6])]]]

Meaning it tried to call distel:rpc_entry/3 on the remote node but it
was undefined.

The trick is that most of Distel's erlang-extended-mode commands want
to make RPCs to the erlang module 'distel'. The install procedure
copies this module into /usr/local/share/distel/ebin/ and then patches
your ~/.erlang to automatically put it in your load path, so that all
your nodes can find it.

The downside of doing that automatically is that it's not obvious that
you need to also install distel (or at least copy the modules distel
and distel_ie into your code path) onto other machines that run nodes
you want to talk with.

Basically, most Distel programs are written half in Erlang and half in
Elisp, and the "distel" module contains the Erlang halves.

Cheers,
Luke




More information about the erlang-questions mailing list