[slime-devel] Re: function I would like

Helmut Eller heller at common-lisp.net
Fri Sep 21 13:40:18 UTC 2007


* John J Foerch [2007-09-20 19:26+0200] writes:

> Nope, this is all I need.  It seems a natural enough extension given
> functions that are in slime now, like `slime-repl-send-string' and
> `slime-send'.
>
> But let me ask this question.  I'm writing an emacs/slime based
> front-end for a common lisp program I'm developing.  The slime repl is
> considered to be part of the UI of this program.  There are emacs
> commands to send forms to slime via the function I gave, but the user
> can also type forms into the repl directly.  The code that
> programmatically uses the repl is easier to read and maintain if I
> write the forms as quoted sexps instead of strings.  Or is there a
> different, better, preferred way to do what I am doing?

Sounds OK to me, since the Slime REPL is part of the UI.  

But consider that slime-repl-send-string is a implementation detail,
not some documented interface function.  Don't blame us if we change
it and break your code.  Slime doesn't have a documented API and it
would be a lot of work to create one.  The function slime-eval-async
is likely to stay forever, though.  Use that if you need something
stable.

Also keep in mind that Emacs sexps and CL sexps look very similar but
aren't fully equivalent.  The proposed slime-repl-send converts a
Elisp sexp to a string and the string is converted to a CL sexp.  The
final result depends on the current CL reader settings.  That may
exactly be what you need in your application, but often it's not.

Helmut.



More information about the slime-devel mailing list