Juri Linkov writes: > Hi Joćo > >> Any simplification to the implementation that keeps the >> "keep original window intent" behavior across xref >> intermediate buffers is very welcome. > > Thanks for the explanation. Now I understand better the intent in > xref--show-pos-in-buf. Generally, I'd like to see the “keep original > window intent” behavior in more places, e.g. in *Occur*, *grep*, etc. > Based on your explanation, I've been able to write the patch that does > the following: Hi again, Juri After re-reading your patch more closely and giving it some more testing, I've discovered it breaks an existing use case: Emacs -Q C-x 2 ;; split-window-horizontally C-x 4 . ;; xref-find-definitions-other-window xref-backend-definitions RET C-n RET ;; in the resulting *xref* buffer Expected xref.el to appear in the bottom window which was my original intent when I said "other window". In the current master this works OK, in your patch it doesn't. But don't worry, I've fixed that. In the patch that I attach to this message, none of the current UI changes is changed, but the xref window should now be configurable as is the original request of this bug. I've also renamed window.el's window--display-buffer to window-display-buffer throughout Emacs (i.e. made it public). After we merge this, we can continue the discussion about the changing the xref UI in the other bug you opened, bug#33992