Closed brendan-r closed 3 years ago
That's an interesting idea. I'll look into that.
I've created a version that parallels how the M-x shell
version works, but it does not seem to work similarly. eval-in-repl
relies on being able to switch to the REPL buffer and paste and execute the code in the script. It can paste the code into the *terminal*
buffer, but execution does not work for some reason. The special behaviors that the *terminal*
buffer has (keys behave differently) may be causing this.
You can try out the no-yet-functional partial implementation below if you are interested.
https://github.com/kaz-yos/eval-in-repl/blob/feature/term-support/eval-in-repl-term.el
That would be really useful, so I might take a look as well. @kaz-yos I see that the branch you linked is no longer available. In any case, do you happen to have some notes about noticable shell/term differences while you were working on the term support?
Looking forward to having shell & term support, would be really useful for devops coupled with https://github.com/diadochos/org-babel-eval-in-repl
From some search it seems like there's the following similar commands which should be selected depending on the shell or term mode
comint-send-string
and term-send-string
comint-send-input
and term-send-input
So I think having a var
for preferring shell
or term
(to make term
work with the existing eval-in-shell
command) should be trivial. That said, I might take a look into it the following days.
@kaz-yos let me know what you think, and also if I you could write here in case you go on doing some work on this, to avoid doing duplicate work :)
Firstly, thank you for this excellent package!
I am brand new to both emacs and elisp, so forgive me if this is a trivial PR (or obviously a bad idea), but would it be possible to extend the package to allow the evaluation of bash code in
multi-term
oransi-term
as opposed toshell
?Regardless, thanks for your work!