Closed bo-tato closed 1 year ago
I just realized both the python-mode
implementation and this, have the problem that send no longer works for large regions over tramp, as it creates the temp file locally.
I added a check if the filename is remote, then just do the old behavior and get duplicate prompts but working. But actually it doesn't matter because inf-ruby doesn't currently support tramp to begin with? IE if you are editing a file over tramp and do run-python
it will run python repl on that remote host, but if you are editing a file over tramp and do inf-ruby
it spawns irb on your local computer, and I can't see an option to spawn a remote ruby and connect it with inf-ruby
I was confused, inf-ruby does work fine over tramp, and I was getting an error with python on tramp for a different reason, it does have logic for creating the temp file remote which I copied. So this is working over tramp now also
and one more small fix as it wasn't deleting the temp file over tramp cause the filename had the /ssh prefix
Nice work! A couple notes inline.
and has ruby read and eval and delete the temporary file rather than using comint-send-string
I think the temp file isn't ultimately deleted, though?
EDIT: Ah no, I just missed that line.
Thanks! I'm fairly new at emacs lisp so any improvements are more than welcome
Thanks again!
I made
ruby-send-string
as a public interactive function as python and clojure and lisp modes have it, I don't personally use it interactively with those languages but I sometimes bind a key tolang-send-string
to send a command to restart a service or whatever other action I'm repeatedly doing.