[slime-devel] loopback interface

Svein Ove Aas sveina at gmail.com
Tue Oct 4 16:48:23 UTC 2005


On 10/3/05, Robert Brown <robert.brown at gmail.com> wrote:
> Thanks very much to all who answered my questions.  The ssh tunnelling does
>  work.  Earlier, it was failing for me, but the cause must have been
> something else.
>
>  I think everyone misinterpreted my second question, however.  The server
> that runs
>  swank does not have any files on it.  I suppose I could use tramp to write
> a file to
>  the server host, and then load it with a separate Lisp command.  I was
> thinking there
>  might be a Slime command that takes a local file, ships it over to the
> swank machine
>  and then makes the Lisp there compile or load it.

Not a Slime command, no, but here's an Elisp function that does half the job:
Figuring out which remote server you're connected to, where to put the
file, etc. would be quite a bit more work, so I'll leave that as an
exercise for the reader.

Maybe it *should* be possible to tunnel files over Slime's connection.
This way requires SSH access, which might not be granted along with
Slime access. (But I can't see any rational reason why not!)

(require 'tramp)
(defun save-remotely (buffer machine)
  (interactive "bSave buffer: \nsTo machine: ")
  (with-current-buffer buffer
    (let ((old-location (buffer-file-name)))
      (write-file (concat "/ssh:" machine ":" (buffer-name)))
      (setf (buffer-file-name) old-location))))


More information about the slime-devel mailing list