GNU bug report logs - #4293
23.1; use pop-to-buffer, not switch...other-window, in bookmark.el

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 30 Aug 2009 15:00:06 UTC

Severity: normal

Done: Karl Fogel <kfogel <at> red-bean.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 4293 <at> debbugs.gnu.org
Subject: bug#4293: 23.1;	use pop-to-buffer, not switch...other-window, in bookmark.el
Date: Wed, 02 Sep 2009 17:47:19 +0200
>> 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.

I thought you wanted to avoid popping up a new frame.  At least in your
first mail you said "pop-to-buffer DTRT: it reuses the existing frame".

> 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.

If you have `display-buffer-reuse-frames' set to nil, `pop-to-buffer'
will not reuse another frame displaying that buffer either.  Please tell
which specific detail of `switch-to-buffer-other-window' you dislike in
the present use case.  Note: It can't be the `other-window' argument,
because in that case we'd have to change the names of the respective
bookmark functions.

martin



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.