bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#52491: 28.0.90; Regression in window deletion with minibuffer


From: martin rudalics
Subject: bug#52491: 28.0.90; Regression in window deletion with minibuffer
Date: Sat, 18 Dec 2021 10:05:50 +0100

> Martin, any comments on this for the release branch?  It looks
> non-trivial to me, and delete-window is a low-level API.

The bug is a regression so it should be fixed.  Whether and how Juri's
fix can affect other operations that use the minibuffer before deleting
some window is beyond my imagination.

I do not understand two things: It seems that this part of the
doc-string

  A minibuffer window is never
  a candidate when MINIBUF is nil or omitted.  MINIBUF t means consider
  the minibuffer window only if the minibuffer is active.

does not match well this part of the code

    (dolist (window (window-list-1 nil (unless minibuf 'nomini) all-frames))

And this (are we sure that we always want to do it when "setting up"
completions?)

      (setq-local delete-window-choose-selected 'mru)

apparently makes this binding

         (choose-selected delete-window-choose-selected)

necessary.  But this would imply that at the time 'delete-window' is
called, its buffer is current which is by no means guaranteed.  So the
latter form should probably become

       (choose-selected
        (buffer-local-value
         'delete-window-choose-selected (window-buffer window))))

martin





reply via email to

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