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: Sun, 12 Feb 2023 10:33:11 +0100

> Apologies for the delay. The updated patch works as expected.
> There is still some strangeness if '((display-buffer-use-least-recent-window))
> is used by itself as compared to using
> '((display-buffer-reuse-window display-buffer-use-least-recent-window))
>
> Specifically, when exiting an org-src-edit buffer, display-buffer-reuse-window
> must be present to prevent display-buffer-use-least-recent-window from
> persisting
> the pop-up window and/or changing a reused window to the buffer for
> the org file.
>
> I don't think this is a blocker however, because it is not entirely
> clear where the
> issue lies, whether it is with how org-edit-special sets up for
> restoring buffers,
> or whether there is something that is off in the most recent implementation of
> display-buffer-use-least-recent-window.
>
> I think we are ok to proceed with the latest patch.

I now tried to document everything I wrote so far.  The attached patch
also differs from the preceding ones in the following regards:

- 'display-buffer-reuse-window' calls 'display-buffer--lru-window' with
  suitable arguments.  This has the benefit that it honors the new
  minimum size entries as well which makes the documentation simpler.
  It has the disadvantage that if I didn't guess those arguments
  correctly, the default behavior of 'display-buffer-use-some-window'
  might change wrt previous versions.

- 'window-bump-use-time' was rewritten taking into account some of the
  issues I mentioned in my last posting.

- A 'bump-use-time' action alist entry has been added.

I'm not sure whether these changes should be made on the release branch.
IMO a suitable minimal change for the release branch would be to remove
all references to 'display-buffer-avoid-small-windows' and leave
'display-buffer-use-least-recent-window' and 'window-bump-use-time'
untouched.  The latter are here since Emacs 28, so there's a good excuse
for leaving them alone.

In either case note that I don't synch with Savannah so someone else
would have to apply these changes.

martin

Attachment: Gillespie.diff
Description: Text Data


reply via email to

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