[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display-buffer-overriding-action

From: Chong Yidong
Subject: Re: display-buffer-overriding-action
Date: Tue, 13 Sep 2011 18:40:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> - Commands like `C-x 5 b' or `info-other-window', which fall under the
>>   "explicit command" criterion and should override the defaults.
> This case depends:
> - historically, it has obeyed special-display-*, which would mean it
>   should obey d-b-alist as well.

Yeah, and I don't think it works very well as an exception (especially
since the special display only kicks in halfway through the window
selection process, after Emacs has tried to reuse a window).

If we want to keep this functionality, one way to do this would be to
make d-b-overriding-action into an alist as well, so that the actions
would come from (in order of priority)

  defcustom d-b-override-alist
  defcustom d-b-alist
  defvar d-b-default-action

with d-b-override-alist serving to replace special-display-*.

> - there are several other `other-window' cases where it's not nearly
>   as clear cut that the user really meant to override d-b-alist
>   (e.g. because it's the only command that has a convenient key
>   binding).

Which cases are you referring to?  Probably they ought to let-bind
d-b-default-action---or be changed to use display-buffer generically.

> Also you forgot the switch-to-buffer case, which uses the ACTION
> argument.

Based on names alone, it seems reasonable for switch-to-buffer,
switch-to-buffer-other-window, and switch-to-buffer-other-frame to all
behave the same way w.r.t. whether to override d-b-alist.  And you've
argued that s-t-b-other-window/frame should override d-b-alist.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]