Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

Just wondering if there is any way to put emacs and shell in the same window. Like split the shell in to two parts, one for shell it self, the other one for emacs. Or is there any way to switch the shell window and emacs window quickly?

The reason I am asking this is: sometimes I need to run my program with shell command, that I have to close the emacs and go back to the shell window. It is a little waste of time to switch back and forth.

Thank you

share|improve this question

migrated from Sep 12 '12 at 23:43

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

2… – Nykakin Sep 11 '12 at 15:31
You can't just use M-x shell from within emacs? – Jon Lin Sep 11 '12 at 15:31
up vote 1 down vote accepted

You are after what is called a terminal multiplexer. The two most commonly used are screen and tmux. tmux has more features and you should favor it over screen if you have a choice.

share|improve this answer

You can always just suspend emacs (M-x suspend-emacs), run your command, then return to emacs (fg).

share|improve this answer

You can always use terminal inside emacs (emacs will do all the painting). Generally you have 3 choices:

  • shell mode - terminal is just another emacs buffer, you can't use utils which require curses or similar libraries (man won't probably work, as well as top or finch),

  • eshell mode - i haven't used it much. It's builtin emacs shell on top of lisp.

  • ansi-term mode - emulates ansi terminal, can work in two modes. You can run man, htop etc., there are some issues, but im quite sure you'll be happy with it. These modes are:

    • character mode - it will grab almost all your emacs bindings, to switch use C-x C-j
    • line wrap mode - it will behave like another buffer, to switch back use C-x C-k.
share|improve this answer

You must log in to answer this question.

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