0

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.

3
  • 1
    This isn't programming related. Recommend moving to Superuser.
    – user9141
    Commented Oct 23, 2011 at 14:25
  • Point taken. How can I move it there?
    – hatmatrix
    Commented Oct 23, 2011 at 14:52
  • It'll take a few more close votes.
    – user9141
    Commented Oct 23, 2011 at 15:23

2 Answers 2

6

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.

3
  • 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.
    – hatmatrix
    Commented Oct 23, 2011 at 21:40
  • 2
    There'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
  • Remote directory tracking is interesting... thanks.
    – hatmatrix
    Commented Nov 14, 2011 at 11:24
1

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

1
  • 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.
    – hatmatrix
    Commented Oct 23, 2011 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .