shcl
shcl copied to clipboard
Elisp Splices
When running a shell command from Emacs (e.g. M-!
), it would be handy if the lisp splice syntax (i.e. ,
) didn't evaluate the lisp form as Common Lisp in SHCL, but instead evaluated it as Emacs Lisp within Emacs.
There are a couple of ways this can be accomplished.
-
SHCL is just running inside Emacs. If SHCL is linked by Emacs then SHCL should be able to call out to Emacs Lisp somehow. Practically speaking this means SHCL will need to build as an ECL library or something. Alternatively, we could implement Common Lisp in Emacs Lisp...
-
SHCL uses
emacsclient
to get Emacs to evaluate the expression. This requires Emacs to be running a server, but that shouldn't be too hard. It seems like Emacs Lisp's syntax is a strict subset of Common Lisp's syntax, so SHCL could useREAD
like it does today. Instead of evaluating the form it would handemacsclient
a string containing the input thatREAD
consumed.