martin rudalics <rudal...@gmx.at> writes: > > (pop-to-buffer BUFFER > > '((display-buffer-reuse-window display-buffer-pop-up-window) > > (reuse-indirect . t))) > > > > 1. If there is a window displaying BUFFER, switch to that window > > 2. If there is a window that is an indirect buffer of BUFFER or that > > shares the same base buffer with BUFFER, switch to that window > > I included the facility that if there is a window whose buffer is the > base buffer of BUFFER use that window. See the attached diff which I > did not test very thoroughly.
Thanks! It seems to work, although somewhat different than I described. With your diff, in case (2), if BUFFER is what is passed to `pop-to-buffer' and BUFFER2 is indirectly related buffer displayed in a visible window, then BUFFER2 is replaced with BUFFER. I expected that BUFFER2's window will be selected; nothing more. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>