GNU bug report logs - #9532
24.0.50; `special-display-regexps' is no longer respected

Previous Next

Package: emacs;

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

Date: Sat, 17 Sep 2011 15:01:01 UTC

Severity: normal

Found in version 24.0.50

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 9532 <at> debbugs.gnu.org
Subject: bug#9532: 24.0.50; `special-display-regexps' is no longer respected
Date: Thu, 22 Sep 2011 08:29:18 -0400
>> So, you agree to the incompatibility for the non-interactive case?  That
>> is to say, a non-interactive call to switch-to-buffer (and ONLY a
>> non-interactive call) will now trigger special display.  Previously, in
>> Emacs 23, it would use the selected window.

Yes.

> It just occurred to me that it would be safer to leave switch-to-buffer
> unchanged, and instead reinstate pop-to-buffer-same-window specifically
> for the callers in question, i.e. the callers who used the
> same-window-regexps/display-buffer trick.  pop-to-buffer-same-window
> would raise a special window for special buffers, instead of using the
> selected window; s-t-b would use the selected window, as in Emacs 23.

It would also be a change in behavior since same-window-* took
precedence over special-display-*.  But it would be a good change: users
like Drew (and myself) had to set same-window-* to nil to let
special-display-* do its job.

So I agree those callers who used same-window-* should be changed to
obey special-display-*, as for whether callers of switch-to-buffer
should also obey special-display-* (and/or display-buffer-alist) I don't
know for sure.

Basically w.r.t "same-window behavior" we have 3 options:
1- never touch another window.
2- obey special-display-* and display-buffer-alist.
3- use the selected window if at all possible, but fallback to
   pop-to-buffer instead of signalling an error.
The third is the current behavior of interactive uses of switch-to-buffer.
The second is the behavior we want for former users of same-window-*.
The third is the behavior that corresponds to Emacs-23's switch-to-buffer.
We could shoehorn this into the `force-same-window' argument of
switch-to-buffer, but I'm not convinced that the difference between
options 2 and 3 is worth the trouble.
  

        Stefan




This bug report was last modified 13 years and 261 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.