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

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

bug#28978: 26.0; Regression: separate, dedicated `*Completions*' frame n


From: martin rudalics
Subject: bug#28978: 26.0; Regression: separate, dedicated `*Completions*' frame no longer has parameter `minibuffer'
Date: Sun, 29 Oct 2017 12:18:09 +0100

> The actual behavior has changed.  I hope we can agree
> on that wording.

We can.

>> I would try (eq (minibuffer-selected-window)
>>                  (frame-selected-window this-frame))
>
> I will try that.  At first sight it solves the problem.
> As there are many different use cases I'll need to see
> whether it works in all cases and doesn't break anything.

You never said what you really wanted to achieve.  I guess that you want
to delete a frame around the time you do some minibuffer interaction and
base the decision of which frame to delete on whether it is the frame
initiating that interaction.  If so, then any code based on the value of
the 'minibuffer' parameter would have been already wrong before my
change as well - an arbitrary number of frames could have had the
'minibuffer' parameter set to nil and there would have been no way to
tell from that parameter which of them initiated the interaction.

> BTW, I find the doc string for `minibuffer-selected-window'
> a bit confusing:
>
>   Return the window which was selected when entering the minibuffer.
>                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
>   Returns nil, if selected window is not a minibuffer window.
>
> The phrase "window which was selected when entering" is
> somewhat ambiguous.  It can easily be understood as the
> window that was selected before the minibuffer was entered,
> rather than the (minibuffer) window that is selected after
> the minibuffer was entered.

Exactly that's the meaning.  I'm afraid you're confusing things here.
The window returned by that function was the selected window until the
minibuffer interaction started.  When the minibuffer action terminates,
that function will return nil again.  The active minibuffer window is
obviously returned by ‘active-minibuffer-window’.

> I think it would be clearer to identify the "when" clearly
> as after entering, not before - when "entering' is unclear,
> especially when used with "was" selected.
>
> (Also, it should probably say "Return nil..." instead of
> "Returns nil...".)

Fixed, hopefully.  I also rewrote the related documentation (to some
extent).

> BTW, I don't see anything yet in NEWS about this change.
> I consider this an incompatible change (you might not).
> In any case, it should be called out, I think.  I see
> a section called "New frame parameters and changed
> semantics for older ones".  That might be a good place
> to mention this.

Done.

martin






reply via email to

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