Is there a good way to manage multiple windows in a large frame?
I usually have one large frame, split into many windows, and I find that when I (or some command) visits a buffer, the choice of window that will display the buffer is somewhat random. Sometimes it chooses a window that I'd like to keep its current buffer, sometimes it makes a new window, etc. All reasonable behaviours, but a bit annoying.
The only resources I've found are display-buffer-alist
and set-window-dedicated-p
, but they are not very convenient. For example, if I make a window dedicated, then I can't make it show a different buffer without undedicating it by hand.
On the other hand, I can use display-buffer-alist
to decide whether a buffer should make a new window/frame, or reuse or split some window, but it's difficult to control which window it uses. It mostly seems the use the least recently used window, but that's not a meaningful heuristic for my setup because I can easily have multiple important windows that I look at, but don't interact with.
Any suggestions?
ido
for quick switching), the switched-to buffer appears in the same window from where I initiateC-x b
. Also, I didn't understand what you mean by "Sometimes it chooses a window that I'd like to keep its current buffer, sometimes it makes a new window, etc.". You can tryace-window
if you want to jump to a particular window. – Kaushal Modi Jan 09 '15 at 21:22magit-status
is especially common, also trace output, backtrace, compilation output), and those buffers have to go in some window somewhere,C-x b
is not the only way to switch to a new buffer. I don't understand what's unclear about the second quoted sentence: it reuses an existing window that I would not like to see reused. – Kirill Jan 09 '15 at 21:28C-x b
. Are you sure you are switching buffers and not creating new buffers? – Kaushal Modi Jan 09 '15 at 21:33C-x b
.) – Kirill Jan 09 '15 at 21:36magit
buffers that was bothering me when being created. – Kaushal Modi Jan 09 '15 at 21:36display-buffer-alist
, but it is not very precise or convenient for managing many windows in a single frame. – Kirill Jan 09 '15 at 21:38#emacs
IRC channel). – wasamasa Jan 10 '15 at 00:08display-buffer
and "pop". Create you own new functions or modify the source code itself until you are happy with how it works. Most people don't do that and try to fix it after the fact, or try to come up with some generalized solution using thedisplay-buffer-alist
. You can make thedisplay-buffer-alist
let-bound for the duration of your custom function and tailor it to your precise needs. There is no one magic solution. – lawlist Jan 10 '15 at 00:49