Subject: bug#67715: 28.2; Minibuffer content is sometimes unexpectedly partially hidden

From: Alan Mackenzie <[email-masked]>
Date: Sun, 23 Feb 2025 16:12:05 +0000

Hello, Eli and Markus.

On Sat, Feb 22, 2025 at 11:23:32 +0200, Eli Zaretskii wrote:
> Alan, any further comments or suggestions?

> > From: Markus Triska <[email-masked]>
> > Cc: Alan Mackenzie <[email-masked]>,  [email-masked]
> > Date: Sat, 08 Feb 2025 13:11:40 +0100

> > Dear Eli, Alan,

> > Eli Zaretskii <[email-masked]> writes:

> > > Ping!  Markus, can you please answer Alan's question?

> > Yes of course, please forgive the late reply, I tried to find out more
> > about the issue in the meantime:

> > First: Yes exactly, the issue is exactly about inserting text in the
> > minibuffer, and the minibuffer no longer resizing. I posted a test case
> > for this regression in this issue. As mentioned, I need this feature to
> > demonstrate certain functionalities of Emacs, where I programmatically
> > insert larger text in the minibuffer so that it is better visible, and
> > this unfortunately now no longer works.

This is a rather vague, possibly circular, justification.  It seems to
say that Markus needs to be able to change the minibuffer font size so as
to be able to demonstrate that he can change the minibuffer font size.

Markus, what exactly can you now not do that you could do previously by
changing this font size?

> > Second, I believe this present issue is closed at least partially for a
> > wrong reason (in the sense that the given reason alone does not by
> > itself justify the change): The reason given was that "The change which
> > caused this cannot be reverted, since it will reintroduce a worse bug
> > (bug#24285).". However, the commit which causes the issue I described
> > attempts to address #55412 (not #24285). What I described works as
> > expected until Emacs 28.1, and stopped working only much more recently,
> > as of Emacs 28.2 due to commit dfa3e6f424b20fe27d9041b2ce7d69811df5d8cd.

> > This commit changes 3 files: frame.c, minibuf.c and xdisp.c.

> > As of Emacs 29.4, the commit can no longer be directly reverted. To find
> > out more about the issue and what exactly causes it, I have therefore
> > produced a patch that can be used to revert the commit that cleanly
> > applies to Emacs 29.4 and can be tested with more recent Emacs versions:

> >     https://www.metalevel.at/ei/minibuffer.patch

> > The patch reverts the changes of all 3 files, and restores the behaviour
> > I get with Emacs versions before the commit was applied.

You mean, it reverts a bug fix, I think.  

> > Considering this patch:

> > 1) if I apply exactly the change (i.e., the reversion) that affects
> >    frame.c, then the test case I posted works exactly as expected,
> >    i.e., as with Emacs versions 28.1 and before.

> > 2) if I apply exactly the change that affects minibuf.c, then the
> >    problem I described in the present issue (#67715) still occurs.

> > 3) if I apply exactly the change that affects xdisp.c, then the problem
> >    I described in this issue also still occurs.

> > In a sense, it seems to be the change to frame.c that causes the issue I
> > described.

What effect does your patch have on the bugs referred to earlier on in this
thread?

> > In the discussion of #55412, there were significant reservations against
> > this commit raised by Martin, which may also be worth considering:

> >     https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55412#74

The pertinent code is difficult code.  Getting everything working
correctly at the same time, in as much as "correctly" is actually
defined, is not easy.

> > I hope this helps. Please let me know any time if you have any remaining
> > questions.

Markus, perhaps you could come up with an alternative and better fix to
these older bugs, one that would still allow you to change the size of
the face in the minibuffer prompt.

> > Thank you and all the best,
> > Markus

-- 
Alan Mackenzie (Nuremberg, Germany).