Since an emacs upgrade I made a long time ago (or was it when I changed my laptop, or when I changed my Ubuntu release? I can't remember), emacs keeps opening new windows whenever I click into a file link in grep-mode (for example). Before, I had this behavior:
- I have a window open (window 0)
- I run a grep command
- I get a new window, with the grep result (window 1)
- I select any line in the grep result, and a new buffer is opened in window 0
Which is what I want: maximum two windows opened, and I get to see around 30 lines per window. Now, instead, I get:
- I have a window open (window 0)
- I run a grep command
- I get a new window, with the grep result (window 1)
- I select any line in the grep result, a new buffer is opened in a new window (window 3). The windows have 30, 15, and 15 lines.
So now I have 3 windows instead of 2, with too few lines. This happens again, until a maximum of 4 open windows. To keep my windows at a minimum height, I need to keep on manually closing windows, which is very annoying.
I guess this has to do with the minimum height of the window, and how many lines the frame has, but I am unable to find the exact settings.
How can I tell emacs to open at most 2 windows in the active frame?
emacs -Q
)? If not, show us the relevant parts of your init file. – Drew Aug 17 '15 at 15:48comment-region
to comment out 1/2, then 3/4, 7/8, 15/16, etc. of the file, until you locate the offending part. Very quick, even if it does not seem so at first. (And certainly better than asking people to guess what your problem might be.) – Drew Aug 17 '15 at 22:02