Daniel White daniel@whitehouse.id.au writes:
I want to send values to the repl from the Lisp image.
(swank::eval-in-emacs '(slime-repl-send-string "(+ 1 1)"))
Firstly, is there a simpler way to approach this?
If you want to write stuff as output to the REPL buffer, use
(defun repl-stream () (swank::connection.user-output (or swank::*emacs-connection* (swank::default-connection))))
(format (repl-stream) "Foobar~%")
If you want to send something as a result (which will turn into a presentation if you use the slime-presentations contrib), use
(defun send-as-repl-result (&rest objects) (funcall *send-repl-results-function* objects))
-T.