Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I may have gotten myself in a bind. I have 3 windows in emacs, 2 of which are buffers and one of which is a bash shell that I created using: M-x term

Now I can't switch out of that window (C-x o) because all the commands are being directed to the terminal. How do I switch in an out of this buffer window?

Much obliged.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I typically use M-x shell to launch a shell rather than term.

Try switching between "line mode" and "char mode" using C-c C-j and C-c C-k as described in the documentation for term mode.

share|improve this answer

Press C-c o instead of C-x o to switch to another window. Press C-c b instead of C-x b to switch to another buffer. More generally, use the prefix C-c where you would normally use C-x. Press C-c C-h to see the full list of commands available on the C-c prefix. There is in particular C-c M-x to execute a command by name (normally on M-x).

Most control keys are sent to the application, and in particular help is not available on C-h, but it's still available on f1, so you can press f1 m to see the help for Term mode, f1 w to see on what keys a command is bound and so on.

If you exit the shell (by typing C-d or with the exit command), the normal Emacs bindings are restored.

share|improve this answer

Your Answer

 
discard

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.