From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60015: 29.0.60; multi-line messages truncated in non-selected minibuffer Date: Thu, 15 Dec 2022 17:30:13 +0200 Message-ID: <831qp0lm62.fsf@gnu.org> References: <86y1rco5xe.fsf@mail.linkov.net> <83cz8oqybf.fsf@gnu.org> <86zgbsmpta.fsf@mail.linkov.net> <83a63sqvhq.fsf@gnu.org> <865yefw7o5.fsf@mail.linkov.net> <83r0x3nqq6.fsf@gnu.org> <86h6xzrxug.fsf@mail.linkov.net> <86mt7pgkzh.fsf@mail.linkov.net> <32f8777a-2bc3-961c-e773-46451f2b9282@gmx.at> <837cyslrfr.fsf@gnu.org> <83359gloyc.fsf@gnu.org> <7fdcca3f-ab71-fb91-990b-d708e585d5b7@gmx.at> <3c5cf7d7-d61f-ba61-8b3e-205b57775833@gmx.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2356"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60015@debbugs.gnu.org, juri@linkov.net To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 16:31:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5qCb-0000UJ-DQ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 16:31:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5qCO-0005dc-AX; Thu, 15 Dec 2022 10:31:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5qCM-0005by-I5 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 10:31:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5qCM-0001zk-9P for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 10:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5qCM-0007Vc-38 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 10:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60015 X-GNU-PR-Package: emacs Original-Received: via spool by 60015-submit@debbugs.gnu.org id=B60015.167111822828851 (code B ref 60015); Thu, 15 Dec 2022 15:31:02 +0000 Original-Received: (at 60015) by debbugs.gnu.org; 15 Dec 2022 15:30:28 +0000 Original-Received: from localhost ([127.0.0.1]:43314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5qBo-0007VH-6H for submit@debbugs.gnu.org; Thu, 15 Dec 2022 10:30:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5qBm-0007V9-7E for 60015@debbugs.gnu.org; Thu, 15 Dec 2022 10:30:26 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5qBg-0001iS-Iw; Thu, 15 Dec 2022 10:30:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UmPw78UCXyjIqi7iIVETJ/Cvi4gmAkcHg/XU+opFVcI=; b=AG4mUhAqUnlu 5mAO07DccOvJSZ8WULxNPDtEg6/jQipFs3y1DqMccMfEBNfkKlVcBm3jhyLnIZJY2S9Jew1TgqCqy TJdPhpWK2l+nEov9+sQ1/yJ1u0crvpnx3ExRiYWdUWGcj5dMSDVJtgy7LRWkEOYcm1Nbp0/XyybKl etTb6VMt+8bnhb9syDOMG+Sebs1OwRX34ZYITxayT2P84k8opAnlQpmYMeTze2s0ZnRv6JnZVN+KH oUQngSOCRlY3scLGN7zQwo5nebtoU6eNKEnmO79U67t3NWueOAJqiUldogdqVAciM0o8vDwJbmFPE VlabAHjFKcWpgo6QTRQjZw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5qBc-0001Of-IF; Thu, 15 Dec 2022 10:30:17 -0500 In-Reply-To: <3c5cf7d7-d61f-ba61-8b3e-205b57775833@gmx.at> (message from martin rudalics on Thu, 15 Dec 2022 16:12:05 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251110 Archived-At: > Date: Thu, 15 Dec 2022 16:12:05 +0100 > From: martin rudalics > Cc: 60015@debbugs.gnu.org, juri@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); }