views:

395

answers:

2

I have ssh'ed to a remote machine and started emacs. I opened one small python application, and then split the screen into two, and M-x terminal-emulator in the other. I would like to edit the script in one section, then press C-x o and run it on the other section. Unfortunately, I can't seem to C-x o away from the terminal emulator and it just ends up typing x o.

Is there a better quick way of doing what I'm trying to do? Or is there a keystroke that will let me switch back to the editor section?

Edit: I just tried doing 'M-x shell', instead of 'M-x term', and that allows me to use C-x o to switch.

Thanks

+1  A: 

ALT-X other-window

C-TAB also works locally. Will that translate over SSH? If not, bind other-window to another key that will go over SSH.

Mark Jones
Thanks! Also found that 'M-x shell' registers the 'C-x o' keystroke by 'M-x term' does not.
garg
I voted this up, but my suggestion would be to just use M-x shell instead, unless you really need something in term that you can't get from shell.
T.E.D.
+3  A: 

While at the * terminal* window, C-^ o to switch to other window, and C-^ C-h for more help.

For some reason C-^ o isn't working for me. If anyone else finds the same, I've found switching to char mode with C-c C-k followed by C-c o works (C-c behaves like C-x in char mode of the terminal emulator) - http://www.gnu.org/software/emacs/manual/html_node/emacs/Term-Mode.html#Term-Mode
Bryce Thomas