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

In emacs I like to have 4 windows open at a time. For example, I frequently have a python interpreter in the first window, my python code I am editing in the second window, mysql in the 3rd window and scratch in the 4th window.

My issue is, whenever I run a command in the minibuffer while in say window 2 it does not open the new buffer created by the command in window 2. It picks some other window. For example, if I am in window 1 and type M-x run-python it will open the python interpreter in any of the other windows. I would like it to open the python interpreter in the current window (in this case window 1). I came across this question which mentions the variable pop-up-windows I set this variable to nil as recommended but nothing has changed. I believe my issue has more to do with "switching" windows.

  1. How can I get a new buffer to be displayed in the window in which it was invoked?
  2. Can this functionality be set for all programs? (or most)

If you need any more information, let me know. All help is much appreciated!

share|improve this question
Maybe this: – Tom Jun 23 '13 at 15:42

In general it is the individual command that determines which window to use for the display. However, you might be able to make some general adjustments by customizing user option display-buffer-alist (if it exists in your version of Emacs --- it is fairly recent).

share|improve this answer

You must log in to answer this question.

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