On Tue, Dec 17, 2024 at 8:47 AM Juri Linkov <juri@linkov.net> wrote: > > 'split-window-preferred-function' is well suited for a completely > different > > behavior. > > There is another aspect that still can't be customized. > The choice of the window to split is hard-coded > in 'display-buffer-pop-up-window'. It's either > the largest window or lru: > > ;; Attempt to split largest or least recently used window. > (setq window (or (window--try-to-split-window > (get-largest-window frame t) alist) > (window--try-to-split-window > (get-lru-window frame t) alist))) > > Maybe another option needed here as well? > That's right, there is the same logic pattern that could be customized the same way. But that should come in another patch. I could make one if people agree. What would be the variable name ? split-window-preferred-selection ? -Nico