GNU bug report logs -
#4293
23.1; use pop-to-buffer, not switch...other-window, in bookmark.el
Previous Next
Full log
View this message in rfc822 format
> > In bookmark-jump-other-window and bookmark-bmenu-other-window we call
> > switch-to-buffer-other-window. We should use pop-to-buffer, instead.
> >
> > With non-nil pop-up-frames, switch-to-buffer-other-window creates a
> > new frame each time, even if the destination buffer is
> > already showing in some frame. pop-to-buffer DTRT: it reuses
> > the existing frame.
>
> I'm not sure what the problem is here.
> `switch-to-buffer-other-window'
> has a clear purpose - do _not reuse the selected window_ (which is the
> bookmarks window, IIUC). OTOH `display-buffer-reuse-frames' non-nil
> should assure that another frame is reused.
Users should not have to customize a global variable, to prevent a new frame
from being used in particular places like this.
As Stefan says repeatedly (paraphrasing), switch-to-buffer-other-window is
almost always the wrong thing to do, and should be replaced in most places by
pop-to-buffer.
Use of switch-to-buffer-other-window is a bug in general, typically made by
someone who doesn't use non-nil pop-up-frames.
In this particular context, there is no reason to use
switch-to-buffer-other-frame.
This bug report was last modified 15 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.