I have a particular fantasy idiom for using McCLIM inside emacs. Since McCLIM uses a swank server, and a swank server handles multiple connections, we can start McCLIM outside of emacs, then slime-connect emacs to that external server. The fantasy aspect is that our creations from inside emacs will survive kill-emacs
in the external lisp image, which can be hooked into again by a later emacs. Itās a nascent idea.
I found it while looking up links. On github though!
and inside your shell, I guess. This is not for eev (I guess it would work in (eepitch-shell)
but that would be inside emacs).
ecl
(require "asdf")
(asdf:load-system :mcclim)
(asdf:system-source-directory :swank)
(merge-pathnames #p"start-swank.lisp" *)
(load *)
Now we are happily using eev
eepitch
.
(eepitch-shell)
(eepitch-kill)
(slime-connect "localhost" 4005)
(setq eepitch-buffer-name "*slime-repl ECL*")
Remember that we loaded mcclim
already in the external lisp.
eepitch
into clim-user
In lisp, we often make -user
packages to absorb user code. This user package is what the package developer expects their users to basically experience.
(in-package :clim-user)
application-frame
(define-application-frame gui () ())
gui
application-frame
We donāt have to instantiate it and can just find-application-frame
to pull it up headlessly, but we want it to stick around outside of emacs in this case.
(make-application-frame 'gui)
(defparameter *gui* *)
(run-frame-top-level *gui*)
The default interactor is a simple shell (having I guess Help
, Describe
and Quit
). Note that it has autocompletion and emacs-like cut and paste. The autocompletion is used implicitly.
If you are filling out a form, <enter>
will set the current field and move to the next one, C-g
aborts, and M-<enter>
(alt+enter) sends the form.
kill-emacs
and leave the form runningI guess I would need to start it in another thread in a tricky way. Still, we can easily pop up a gui now. And that *gui*
still literally exists in the running ECL
lisp image outside of emacs.
So the *gui*
does not do anything yet, but what we did works and it persists outside of the emacs session.
See you on the Mastodon to talk about this.
screwlisp proposes kittens