reddit / emacs

Edit remote files with Emacs via Eshell CD - Amazing!

pheedrus · 2022-06-03 04:03
Just stumbled across this reading my elfeed news and oh my, never knew you could do this with eshell & cd. [https://200ok.ch/posts/edit-remote-files-with-emacs.html](https://200ok.ch/posts/edit-remote-files-with-emacs.html)
Trout_Tickler · 2022-06-03 08:15
Can do one better, with [`consult-dir`](https://github.com/karthink/consult-dir#remote-hosts) you can jump to remote hosts and even docker containers :)
thedieselspaceship · 2022-06-03 08:52
Excellent! Thanks for the information
aard_fi · 2022-06-03 09:08
I mostly use tramp to edit stuff remotely, and very rarely need a shell. If I do I just do M-x eshell (or M-x shell) while visiting a dired or file buffer via tramp - you'll then get a remote shell in the working directory of the tramp buffer you've been visiting.
WallyMetropolis · 2022-06-03 14:18
Thanks for pointing out this package. Exploring it now!
markasoftware · 2022-06-03 20:05
Huh, it doesn't seem to work for me. The modeline reads "Opening connection ..." for several seconds, as expected, but then I just get "bash: cd: /ssh:root@blah.com:: No such file or directory" in the eshell buffer.
pheedrus · 2022-06-03 20:12
That is strange; I tried it with remoting into a couple of servers without issue.
zelphirkaltstahl · 2022-06-03 20:26
Tramp works fine for SSH for me, but somehow it manages to hang Emacs, when I enter a docker container, then the docker container disappears and I have not yet cleaned up the tramp connection. Really annoying. Need to mash `C-g`, but every time tramp tries to figure out what happened to that docker container, it hangs again. So no tramp into docker container for me. Although I have not tried with Emacs 28, only with 27. Maybe 28 has a fix.
rswgnu · 2022-06-04 16:24
With Hyperbole, you just type a Tramp path in any buffer, press M-RET, the Action Key and you are taken to the file or a dired buffer on the directory. You can even have Lisp and env. variables in the path. No reason to limit this to specialized. Just type and press.