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.

link|improve this question

69% accept rate
1  
This isn't programming related. Recommend moving to Superuser. – yodaj007 Oct 23 '11 at 14:25
Point taken. How can I move it there? – crippledlambda Oct 23 '11 at 14:52
It'll take a few more close votes. – yodaj007 Oct 23 '11 at 15:23
feedback

migrated from stackoverflow.com Oct 26 '11 at 14:08

This question came from our site for professional and enthusiast programmers.

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.

link|improve this answer
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. – crippledlambda Oct 23 '11 at 21:40
2  
There's no need to retype the path. Just use remote directory tracking: emacswiki.org/emacs/AnsiTermHints#toc4 – Asher L. Oct 24 '11 at 0:18
Remote directory tracking is interesting... thanks. – crippledlambda Nov 14 '11 at 11:24
feedback

Pretty sure this question is addressed on the relevant emacswiki page.

link|improve this answer
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. – crippledlambda Oct 23 '11 at 15:52
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.