4

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.

2 Answers 2

5

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.

4

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.

You must log in to answer this question.

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