I've read that it is possible to run emacs (remote machine) within emacs (local machine) using multi-term/ansi-term. How do I set up the appropriate key bindings to enable control of the remote emacs? For instance, C-x C-f
will try to open local files.
-
1This isn't programming related. Recommend moving to Superuser.– user9141Commented Oct 23, 2011 at 14:25
-
Point taken. How can I move it there?– hatmatrixCommented Oct 23, 2011 at 14:52
-
It'll take a few more close votes.– user9141Commented Oct 23, 2011 at 15:23
2 Answers
An alternative approach is to use Tramp. This allows you to open remote files from within a local Emacs session. Then you can kill/yank/whatever between local and remote files as if they were all on the same computer. With tramp, you specify at the prompt whether C-x C-f
should open a local or remote file, and other than that everything else is handled behind the scenes.
-
Thanks, I do use tramp from time to time. But sometimes when you are already in a terminal shell in a particular directory, it is easy just to type
emacs filename
rather than having to retype the path to open the file in tramp-mode, and also to run an interactive Python interpreter in the same emacs buffer. Commented Oct 23, 2011 at 21:40 -
2There's no need to retype the path. Just use remote directory tracking: emacswiki.org/emacs/AnsiTermHints#toc4– Asher L.Commented Oct 24, 2011 at 0:18
-
Pretty sure this question is addressed on the relevant emacswiki page.
-
Yes, this is where I read that it was possible, but then I would not be able to switch commands between local and remote emacs. I was hoping someone could suggest a configuration that works for him/her. Commented Oct 23, 2011 at 15:52