1

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

2

3 Answers 3

1

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.

1

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

1

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.

You must log in to answer this question.

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