I just saw this trick over on Asymmetrical View. It is really, really simple to connect to a remote instance of Clojure running swank.
With emacs running on your local machine, and sshd and swank-clojure running on the remote host (here shown as the IP 1.1.1.1), just make an SSH tunnel between the two PCs:
ssh -L4006:localhost:4005 1.1.1.1
Then, in your local instance of emacs, run
m-x slime-connect
And connect to port 4006 on the local machine. Bada-bing! Test it out with:
(future (println "Hello remote instance"))
I chose to map remote port 4005 to local port 4006 because I usually already have an instance of the Clojure REPL running locally on 4005.
March 29th, 2011 on 6:08 pm
Thx for the tip. It helped me … a little :)
“versions differ: nil(slime) vs. 20100404 (swank). Continue? ( or n)” is what I get now :(
Best Regards