Hello,
I have SBCL running on an Opteron Cluster (at the moment only one process). This cluster has no Emacs installed. I can connect to it only with ssh.
1. Is it possible to control the remote SBCL job with SLIME running on my own computer (a Laptop)? Can SLIME work also with remote files via Tramp (e.g. by sending expressions to the remote SBCL)? How is the setup?
2. It would be nice if the SBCL job could be kept running (doing a lengthy calculation) while I disconnect and log out (e.g. when carrying my Laptop to another place). What is the right thing to do here? Maybe screen or detachtty? Both are not installed yet, but this would probably be easy...
Thanks for any hints, Nicolas.
Nicolas Neuss Nicolas.Neuss@iwr.uni-heidelberg.de writes:
Hello,
I have SBCL running on an Opteron Cluster (at the moment only one process). This cluster has no Emacs installed. I can connect to it only with ssh.
Is it possible to control the remote SBCL job with SLIME running on my own computer (a Laptop)? Can SLIME work also with remote files via Tramp (e.g. by sending expressions to the remote SBCL)? How is the setup?
It would be nice if the SBCL job could be kept running (doing a lengthy calculation) while I disconnect and log out (e.g. when carrying my Laptop to another place). What is the right thing to do here? Maybe screen or detachtty? Both are not installed yet, but this would probably be easy...
I use SBCL and SLIME in a very similar situation. I use SBCL for a website on my web server, and I do work with a local Emacs process and communicate via ssh.
I use ssh-agent to avoid using passwords.
I connect to the remote server with:
ssh -L 4005:localhost:4005 my-webserver.com
I have an SBCL image saved with swank loaded, and I run it within screen. When I start the process, I run:
(swank:create-server :port 4005 :dont-close t)
Then, from within emacs, I can do:
M-x slime-connect RET 4005 RET
I have also customized slime-translate-to-lisp-filename-function and slime-translate-from-lisp-filename-function to create and un-create tramp filenames as needed. M-. and C-c C-k work as expected.
This setup has worked very well for me so far.
Zach
Zach Beane writes:
This setup has worked very well for me so far.
That's essentially my setup, too. I have a couple different SBCL processes images jailed in different places, so I have them listening on different ports (4005,6,7...). One thing that's kind of a gotcha is that normally Swank uses two ports, one for Emacs->SBCL communication, and one for SBCL->Emacs stuff. If you set swank:*use-dedicated-output-stream* to nil, all Swank communication will happen over the forwarded port.
Zach Beane xach@xach.com writes:
I use ssh-agent to avoid using passwords.
I have my key authorized on the server which should give the same.
I connect to the remote server with:
ssh -L 4005:localhost:4005 my-webserver.com
OK.
I have an SBCL image saved with swank loaded, and I run it within screen. When I start the process, I run:
(screen is not there and is somewhat more complicated to install (needs ncurses), but I installed detachtty/attachtty which seem to work well.)
(swank:create-server :port 4005 :dont-close t)
OK, seems to work. * (swank:create-server :port 4005 :dont-close t) ;; Swank started at port: 4005. ; Adding fd handler: 5
4005
Then, from within emacs, I can do:
M-x slime-connect RET 4005 RET
Here I get problems, my *Messages* buffer shows:
Connecting to Swank on port 4005.. Loading cl-indent (source)...done Loading mule-util...done error in process filter: let: connection failed: connection refused, 127.0.0.1, *lisp-output-stream* error in process filter: connection failed: connection refused, 127.0.0.1, *lisp-output-stream*
I have also customized slime-translate-to-lisp-filename-function and slime-translate-from-lisp-filename-function to create and un-create tramp filenames as needed. M-. and C-c C-k work as expected.
This setup has worked very well for me so far.
Zach
Thank you, Nicolas.
Nicolas Neuss Nicolas.Neuss@iwr.uni-heidelberg.de writes:
Then, from within emacs, I can do:
M-x slime-connect RET 4005 RET
Here I get problems, my *Messages* buffer shows:
Connecting to Swank on port 4005.. Loading cl-indent (source)...done Loading mule-util...done error in process filter: let: connection failed: connection refused, 127.0.0.1, *lisp-output-stream* error in process filter: connection failed: connection refused, 127.0.0.1, *lisp-output-stream*
See Thomas's note about swank:*use-dedicated-output-stream* to fix this.
-Luke
Luke Gorrie luke@synap.se writes:
See Thomas's note about swank:*use-dedicated-output-stream* to fix this.
-Luke
Thanks to all of you. Looks as if it works!
Nicolas.