Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from Oct 26 '11 at 14:08

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

This isn't programming related. Recommend moving to Superuser. – Amy 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. – Amy Oct 23 '11 at 15:23

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.

share|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
There's no need to retype the path. Just use remote directory tracking: – Asher L. Oct 24 '11 at 0:18
Remote directory tracking is interesting... thanks. – crippledlambda Nov 14 '11 at 11:24

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

share|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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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