[Top][All Lists]

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

Re: [PATCH] Fix display-buffer-use-some-window to honor reusable-frames

From: Tom Gillespie
Subject: Re: [PATCH] Fix display-buffer-use-some-window to honor reusable-frames
Date: Mon, 30 Jan 2023 17:45:26 -0500

> > is probably not what you really want.

> You're right. I missed the case where we first want
> to reuse an existing window if the buffer is already
> displayed in it. Working on a patch to add that back.

Here is the updated patch, but it comes with a question.
On review, the reason why I did not include a call to
display-buffer-reuse-window (or get-buffer-window)
internally is because in my config I have the following

(setq display-buffer-base-action
      '((display-buffer-reuse-window display-buffer-use-least-recent-window)))

I think it is probably correct to have display-buffer-use-least-recent-window
try to call display-buffer-reuse-window itself (effectively), however it does
seem like it makes display-buffer-use-least-recent-window less composable
because it can no longer be used to compose a base action that did not
reuse existing windows.

For example I can imagine that someone might want to display a buffer
twice and have the 2nd instance of the buffer pick the least recent window
by default. If we use this version of the patch that is no longer possible.

Therefore I think the prior version of the patch from
Sun, 29 Jan 2023 14:02:42 -0500 is probably the best.


Attachment: 0001-Fix-display-buffer-use-least-recent-window-to-split-.patch
Description: Text Data

reply via email to

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