emacs-devel
[Top][All Lists]
Advanced

[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: martin rudalics
Subject: Re: [PATCH] Fix display-buffer-use-some-window to honor reusable-frames
Date: Tue, 31 Jan 2023 09:46:15 +0100

>> Why?  Any reusable frame would have been already honored by
> 'display-buffer-reuse-window'.
>
> If 'display-buffer-reuse-window' fails to find a valid window then
> the next function to run will be 'display-buffer-use-some-window'.
>
> In the current implementation of 'display-buffer-use-some-window'
> get-lru-window only searches the existing frame and not-this-window
> will be true, therefore whenever there is a single window in the
> current frame 'display-buffer-use-some-window' will proceed on to
> pick a window in another frame starting with visible then 0 for all-frames
> when it calls
> (get-largest-window 'visible nil not-this-window) and then
> (get-largest-window 0 nil not-this-window)
>
> This is not the behavior that we want because a single window in the
> current frame will never be able to reach display-buffer-pop-up-window
> since 'display-buffer-use-some-window' will succeed on a random window
> in a random frame which will almost certainly not be the least recently used.
>
>> Why would you want to change 'display-buffer-use-some-window'?
>
> I don't, but in your example where we call it in
> display-buffer-use-least-recent-window then it would have to be
> modified since as is it is impossible to get the behavior we need
> due to the calls to get-largest-window.

I think you are right.  No more objections from my side but please leave
a comment in the code summarizing what you said here.

martin



reply via email to

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