>> As said, this is not the problem. You probably should have used an 'inhibit-switch-frame' ALIST entry then. > BTW, the call tree looks like > > undo-tree-visualize > switch-to-buffer-other-window > > pop-to-buffer with t ACTION > > display-buffer with t ACTION > > display-buffer-reuse-window > > and the last blindly uses the first window in > > (get-buffer-window-list buffer 'nomini frames) > > which can be a window of a different frame even if there is a suitable > window in the selected frame. That's not good IMHO. OK. Then please, try the attached patch. Note that when there's no suitable window on the selected frame you will still get the annoying behavior. Thanks, martin