Open arichiardi opened 4 years ago
Ok actually this was easy from the sly-mrepl
buffer:
(comint-send-string (get-buffer-process (current-buffer)) "(+ 1 1)")
And I see it in the buffer.
I probably then need to understand more about connections when doing it from the code buffers.
For completeness, this package shows the workflow I am looking for :smile:
https://github.com/kaz-yos/eval-in-repl
But no worries, if not possible I can always adapt :wink:
I think I am deep in a rabbit hole as I was trying to implement an extension for eval-in-repl
.
I found a small road block for now.
Basically that library needs a zero-arity function that does the evaluation of whatever is at point.
For example in cider
it just calls cider-repl-return.
Found some more info, still haven't had time for it properly:
So I added support for sly
in eval-in-repl.
However I am still not 100% satisfied with the flow.
Hi @joaotavora, I am starting out with Common Lisp after quite a bit of Clojure and I was wondering if I could have a workflow where I evaluate the last sexp and see it in
comint
together with the result.I have contributed quite a bit to https://github.com/clojure-emacs/inf-clojure back in the days and we were about to achieve that with
comint-send-string
if I remember correctly.I was wondering if you were interested in this feature.
If so, I have a question, I skimmed through the code but I haven't figured out how to obtain the
comint
process yet.Thanks and keep up the good work!