I'll get terminology wrong here, so be gentle with that (only).
cd ~/src/ ./emacs * C-x 2
So I've got two windows here, one above the other, and a bunch of files in my buffer list (more than 2). When I
C-x k to kill the buffer that I'm in, of course its window then shows another buffer from my open list.
From 1997 to 2014, or so, Emacs has worked hard to avoid the buffer I also have open in another pane (which is usually awesome). Recently though, when I use
C-x k Emacs just loads whatever the next-most-recently-used buffer was into the selected window .. and that's usually the buffer I already have open in the other pane. So then it looks like:
--top-bordery-border-- file #1 stuff -UUU:%--F1- [mode] --- file #1 stuff -UUU:%--F1- [mode] ---
... which can be called Silly, most times.
Has anyone who can understand my bad description, who's seen that behaviour, know how to get the older behaviour back?
replace-buffer-in-windows, which function is defined in
window.el. It may be as simple as you opening an older version of Emacs that you liked and type
M-x find-function RET replace-buffer-in-windows RETand then copy that function over to your current
init.elfile. You will not need to
requireany libraries for the new function with the same name to supercede the older function. Although I have not specifically tried what I am suggesting, I do use a modified version of that function in my own setup.
replace-buffer-in-windowsfrom a previous Emacs version with that of the current version and go from there .... This comment should draw the attention of the above-mentioned user, and he is certainly free to post his own answer here and when you accept it, the related/duplicate question can be marked as such and closed. If this will end up being the master question on that issue, you or someone else may deem it appropriate to have a better title so Google and forum searchers can find this thread easily.