GNU bug report logs - #60015
29.0.60; multi-line messages truncated in non-selected minibuffer

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Mon, 12 Dec 2022 18:08:02 UTC

Severity: normal

Found in version 29.0.60

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 60015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 60015 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#60015: 29.0.60; multi-line messages truncated in non-selected
 minibuffer
Date: Thu, 15 Dec 2022 17:30:13 +0200
> Date: Thu, 15 Dec 2022 16:12:05 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> Cc: 60015 <at> debbugs.gnu.org, juri <at> linkov.net
> 
>  > So the problem seems to be
>  > with 'set-message-functions' and there I'm lost.
> 
> BTW
> 
> (setq set-message-functions nil)
> 
> fixes it here.

Of course.  Because then the temporary-message-shown-as-overlay
feature is disabled, and we show messages via xdisp.c code.  Like I
said: this particular issue happens because in this scenario
set-minibuffer-message bypasses the "normal" code in message3_nolog
which displays messages "normally".  We just add an overlay to the
minibuffer, and expect redisplay_window to resize the mini-window as
part of its redrawing all the windows.  But redisplay_window doesn't.

Juri, does the patch below give good results?  It's a bit of overkill,
since the mini-window usually doesn't need any resizing, but maybe
that is not too bad.

If it seems to solve the problem, would you please run with this for a
couple of weeks, and report back if you see any problems?  If there
are no problems, I'll then install this on the emacs-29 branch.

diff --git a/src/xdisp.c b/src/xdisp.c
index d14cd46..45da496 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19429,6 +19429,13 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
 	    blank_row (w, row, y);
 	  goto finish_scroll_bars;
 	}
+      else if (minibuf_level >= 1)
+	{
+	  /* We could have a message produced by set-minibuffer-message
+	     displayed in the mini-window as an overlay, so resize the
+	     mini-window if needed.  */
+	  resize_mini_window (w, false);
+	}
 
       clear_glyph_matrix (w->desired_matrix);
     }




This bug report was last modified 2 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.