[slime-devel] Running CL code from elisp, and vice versa

Harald Hanche-Olsen hanche at math.ntnu.no
Mon Feb 13 15:13:35 UTC 2006


Is there a convenient function for running bits of CL code (in the
backend common lisp of course) from elisp?

I've been playing around with slime-eval-with-transcript and
slime-eval-async, with rather mixed success.  Most commonly, I just
get a protocol error and lose my slime connection.

Am I looking in the wrong place, perhaps?

Why do I want this?  Say I am editing some (non-lisp) file and then
want to process it by feeding the filename to some function in the CL
backend.  I'd like to be able to just run something like
(slime-eval-thing `(process-file ,(buffer-file-name)) ":cl-user") and
have the backend lisp run (process-file "/foo/bar") or whatever.

And, while we're at it, how about the backend lisp asking emacs to run
some elisp code?  Most importantly, I want to be able to have the
backend ask emacs to open a file, and perhaps move to a specified
point in the file.  I notice that the debugger seems able to do this,
so surely, the functionality exist.  But how accessible is it to the
user?

- Harald



More information about the slime-devel mailing list