суббота, 28 июля 2007 г.

remote swank server, emacs & unicode

.emacs:
(add-to-list 'load-path "~/elisp/slime")
(require 'slime)
(setq slime-net-coding-system 'utf-8-unix)
(set-language-environment "utf-8")
(slime-setup)

swank.lisp:
(require 'asdf)
(asdf:oos 'asdf:load-op 'swank)
(setq swank:*use-dedicated-output-stream* nil)
(swank:create-server :coding-system "utf-8-unix")

On remote host:
$ sbcl --load swank.lisp

ssh tunnel for slime using putty:
Putty Configuration Menu->New Session->Connection->SSH->Tunnels:
Source port: 4005
Destination: localhost:4005

Putty Configuration Menu->Session:
Host name or ip: user@host-with-swank

ssh tunnel for slime using ssh:
ssh -2 -N -f -L 4005:localhost:4005 user@host-with-swank

Connect to slime:
M-x slime-connect


Links:
Emacs for Windows
SLIME