[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35006: 27.0.50; Minibuffer sometimes unexpectedly does not grow
From: |
Eli Zaretskii |
Subject: |
bug#35006: 27.0.50; Minibuffer sometimes unexpectedly does not grow |
Date: |
Wed, 27 Mar 2019 19:55:32 +0200 |
> From: Markus Triska <triska@metalevel.at>
> Date: Tue, 26 Mar 2019 18:31:03 +0100
>
> Please start Emacs with "emacs -Q", and then evaluate in the
> *scratch* buffer the following form:
>
> (with-selected-window (minibuffer-window)
> (erase-buffer)
> (insert (propertize "hello" 'face '(:height 2.0)))
> (read-key)
> (erase-buffer))
>
> This shows "hello" in the minibuffer, and the minibuffer grows as
> expected. Please press a key (or C-g) to continue.
>
> Next, please make a frame, say "F", with the form:
>
> (make-frame '((name . "F")))
>
> In F, please press:
>
> M-x C-g
>
> This simply enters and exits the minibuffer.
>
> Then, in the original frame, evaluate again the form above, i.e.:
>
> (with-selected-window (minibuffer-window)
> (erase-buffer)
> (insert (propertize "hello" 'face '(:height 2.0)))
> (read-key)
> (erase-buffer))
>
> Unexpectedly, the minibuffer is now no longer grown in the (selected)
> frame where this form is evaluated (again), and therefore the inserted
> text is now not fully visible, in contrast to the first time.
I think you expect resize-mini-windows to do what it was never
designed to do.
This feature is supposed to resize mini-windows for the purposes of
interacting with the user, i.e. for displaying messages in the
echo-area, and for prompting the user for input and receiving input in
response. You are doing something different: you insert arbitrary
text into a mini-window's buffer, which is a normal buffer operation
not specific to mini-windows. The text you insert is displayed as
part of normal redisplay of all the windows, not as user interaction
via the mini-window. So in that case, the mini-window is just like
any other window, and those don't resize automatically to accommodate
the text you inserted when they are redisplayed.
Maybe it's a flaw that should be fixed by enhancing the design and
making the implementation follow suit, but currently the code works as
designed, AFAICT.