[slime-devel] Remote SLIME?

Luke Gorrie luke at bluetail.com
Fri Nov 14 17:56:30 UTC 2003


Christian Lynbech <christian.lynbech at ericsson.com> writes:

> Has there been thoughts on extending slime to be able run lisps at
> other hosts than the local (ala Franz' eli)?

Yes and no. Connecting the socket is not a hard problem, but figuring
out what does/should/can work without a shared filesystem isn't
something we've really done yet.

What we have now is `M-x slime-connect' which asks for the host:port
and then tries to connect to Lisp at that address. You can start the
Lisp server by calling `swank::start-swank-server'. (If you're using
CMUCL or SBCL, you'd need to tweak that function, because it usually
binds the socket on the loopback interface, so you can only connect
locally.)

If you want encryption with that, you could use SSH port-forwarding.

This is just how it is today - it'd be great to make this work
better. Suggestions/patches/ideas welcome :-)

> I am not quite sur exactly how slime and swank communicates, but the
> connection process certainly involves a file in /tmp which isn't so
> hot in a multi host setup.

Originally we had Lisp bind a "well-known" port (4005) and then Emacs
connect to that, but this was problematic if you wanted to run
multiple Emacsen each with an inferior lisp - only one gets to use the
port. (Come to think of it, we could have nearly solved this just by
closing the listen-socket after accepting one connection.)

To avoid that problem, currently Lisp binds a random available port,
and then writes the port number to a file in /tmp for Emacs to
read. That way we don't have to parse output from the Lisp listener,
but it's still not particularly elegant. It is collision-free because
the /tmp filename includes the Emacs pid.

A nice solution would be for Lisp to connect to Emacs instead, since
it'd be easy for Emacs to pass the port number to Lisp. Our own Helmut
Eller has added the necessary listen-socket support to GNU Emacs, but
it's too new to use in portable Elisp code yet.

-Luke





More information about the slime-devel mailing list