[slime-devel] non-interactive interaction with repl

Vladimir Sedach vsedach at gmail.com
Tue Jun 19 18:00:06 UTC 2007


Evaluation is done in the swank-io package, so what you really want is
(slime-eval (list 'swank:eval-and-grab-output (format "%s"
'*package*))), where swank:eval-and-grab-output does symbol reading in
the current slime buffer for you.

Vladimir

On 6/19/07, Joe Corneli <jcorneli at planetmath.org> wrote:
> I see how I can non-interactively feed the REPL, by using
> `slime-repl-eval-string' -- e.g. --
>
> (slime-repl-eval-string "*package*")
>
> However, I don't see how to get the back into Emacs in a
> straightforward way.  Whereas the above command prints the current
> package in the REPL buffer, I desire a command that returns the
> current package to Emacs.
>
> (slime-eval (+ 1 2))
>
> returns 3.
>
> (slime-eval '*package*)
>
> triggers SLDB with the error
>
> The variable SWANK-IO-PACKAGE::*PACKAGE* is unbound.
>    [Condition of type UNBOUND-VARIABLE]
> _______________________________________________
> slime-devel site list
> slime-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/slime-devel
>



More information about the slime-devel mailing list