Ever since I installed emacs on a new machine I have seen an ugly behaviour. Unfortunately, my old .emacs files are rather fragmented and I can't determine whether I used to have elisp that took care of this.

The problem is this: it used to be that when I performed a command that would open a new buffer such as grep'ing, or clicking a file name within search results, one of two things would happen:

  1. If only one buffer is showing, the screen will split once
  2. If more than one buffer is showing, the buffer window after the current buffer window would open the desired file

I want this behaviour back. What I am getting now is the following:

Emacs will keep splitting the window until four buffer windows are open. If I continually click multiple grep results, the buffer window where they open cycles through the three other (non-grep-results) buffer windows. I'd like it if they just kept opening in the same location: the "next" buffer window beside/below the results--same buffer window every time.

Any thoughts on how to achieve this behaviour?

Edit
Report