[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: Wed, 14 Sep 2011 18:36:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> If the majority of non-trivial calls to display-buffer are not going to
>> use the ACTION argument, that is a waste of the ACTION argument.
> Agreed.  I see no evidence that we're heading this way.

I don't think we are convincing each other.  I guess we can keep the
current system, but let me make sure I understand your position:

- Interactive and non-interactive calls to switch-to-buffer,
  switch-to-buffer-other-window, and switch-to-buffer-other-frame shall
  override d-b-alist.  (This includes calls from commands in the Emacs

- To do this, s-t-buffer etc should let-bind d-b-overriding-action,
  instead of using ACTION as they currently do.

- This means that d-b-alist can't be used to tell Emacs "when I call
  s-t-buffer(-other-*) for this buffer, do this action instead".
  AFAICT there would be no way to do this except advice.

- If d-b-overriding-action is meant for use by s-t-b and co, then it
  should be a defvar, not a defcustom.

Is this accurate?

> That's the reason why we have the ACTION argument: so non-trivial
> users of display-buffer can pass their preference without imposing it
> on the user (because the user can override it in d-b-alist).

Any example in mind?  Note that if s-t-buffer etc are changed to use
d-b-overriding-action, there will be zero uses of the ACTION argument in
the Emacs source tree.  But can you point to the prospect of any uses in
the future?

reply via email to

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