This is probably a somewhat stupid question. I use tramp to edit remote files, but I also open several terminals for this remote machine, as well as for other work (I had problems running the ssh shell inside emacs).
Often during terminal operation, I would like to edit some file, and my current procedure is to copy the file name and then use emacs tramp to open this file (after randomly accessing the file path in tramp format). This is too much work for quick editing and errors associated with the error in the processing part of the path.
The question is: can I execute some command in a remote ssh session that accepts the file name, convert it to tramp format (which is the easy part) and run a local command (e.g. emacsclient blahblahblah ) so that I can edit the remote file using tramp in local emacs?
I'm not sure how clear I am. I do not want to run emacs on a remote computer (either on a terminal or through an x session), but I want to send the file to local emacs from a remote prompt, for example:
user@remote-machien ~/ $ run_local_emacs somefile # then the file "/ssh:user@remote-machine/:/home/user/somefile" shows up # in my local emacs
ssh emacs tramp
polyglot Feb 09 '10 at 19:32 2010-02-09 19:32
source share