| Christian Nybø ( @ 2007-04-10 19:15:00 |
| Entry tags: | xemacs common lisp slime lispworks |
Slime in XEmacs talking through ssh to a remote lispworks
Presume you can talk to remote-host through ssh.
Install slime in ~/slime/ on both remote-host and the local host.
Create a file ~/swank.lisp on remote-host with the following lines:
(load "~/slime/swank-loader")
(flet ((create-server-aux ()
(swank:create-server :port 14005 :style :spawn)))
(swank::initialize-multiprocessing #'create-server-aux))
;; now the ssh command from emacs is:
;; M-x ssh RET remote-host -L4005:localhost:14005 bash --login -c "lispworks -init swank" RET
Then you can say the following in the local XEmacs:
M-x slime-connect RET RET
Or merge the two into the following emacs lisp function:
(defun slime-on (host)
(interactive "sHost: ")
(let ((bufname (generate-new-buffer-name (format " *swank-init@%s*" host))))
(ssh (format "%s -L4005:localhost:14005 bash --login -c \"lispworks -init swank\""
host)
bufname)
(accept-process-output (get-buffer-process bufname))
(slime-connect "localhost" 4005)))