Using LispWorks Personal Edition from Emacs
For reasons, I wanted to try creating a Cocoa window from Lisp. The ridiculously easy way to do this is to just use LispWorks; I installed the LispWorks Personal Edition to try this out. But then of course we want to talk to LispWorks using Emacs sly-mode, and it's not exactly documented anywhere how to do this for the Personal Edition. So here's how to do it.
Add this to your .slynkrc
so that IO redirection occurs when using
sly-connect
(normally this only happens with M-x sly
):
(setf slynk:*globally-redirect-io* t)
Startup LispWorks Personal Edition, and then enter the following into the LispWorks REPL:
(load "~/quicklisp/setup.lisp")
(ql:quickload :slynk)
(slynk:create-server :port 4005 :dont-close t)
Now, from Emacs:
M-x sly-connect
Finally, to check that it's working, evaluate the following:
(capi:display
(make-instance
'capi:interface
:visible-min-width 200
:title "Hello world"))
Easy!
13 July 2025