[Top][All Lists]

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

Re: display-buffer-overriding-action

From: Stefan Monnier
Subject: Re: display-buffer-overriding-action
Date: Tue, 13 Sep 2011 20:53:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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

I don't know what you're referring to.  The reuse that takes place
before is not only harmless: special-display-popup-frame redoes its own
reuse check in case the earlier code didn't do a thorough enough job,
because reusing is what we want to do if possible rather than create
a new dedicated frame.

> 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
>   Lisp ACTION
>   defcustom d-b-alist
>   defvar d-b-default-action

I have no idea what you're trying to achieve with such a re-organisation.

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

Maybe you're right.  In any case, right now they should most likely call
switch-to-buffer-other-* so as to avoid deciding how to implement it.

> And you've argued that s-t-b-other-window/frame should override
> d-b-alist.

Not quite: I argued that C-x 5 b should (and yes, C-x 4 b as well).
But that should not necessarily affect callers of s-t-b-other-*, unless
they are in the same situation (i.e. all 3 versions are bound to keys
so that the user's choice is clear).

Also, I do not want to make such a change in 24.1 because I'm not 100%
sure it would really be beneficial.  We need to play a bit with
it first.

So for Emacs-24.1, d-b-overriding-default will most likely stay unused,
and that's fine by me.


reply via email to

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