From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#60015: 29.0.60; multi-line messages truncated in non-selected minibuffer Date: Thu, 15 Dec 2022 19:37:03 +0200 Organization: LINKOV.NET Message-ID: <861qp0a87s.fsf@mail.linkov.net> 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> <83v8mck3a5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33252"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: Gregory Heytings , 60015@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 18:41:20 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 1p5sER-0008RF-O2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 18:41:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5sDH-0008DO-Mf; Thu, 15 Dec 2022 12:40:07 -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 1p5sDF-0008At-B8 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 12:40:05 -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 1p5sDF-00008I-2Z for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 12:40:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5sDE-00031M-UG for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 12:40:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 17:40:04 +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.167112599511556 (code B ref 60015); Thu, 15 Dec 2022 17:40:04 +0000 Original-Received: (at 60015) by debbugs.gnu.org; 15 Dec 2022 17:39:55 +0000 Original-Received: from localhost ([127.0.0.1]:43951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5sD4-00030K-L6 for submit@debbugs.gnu.org; Thu, 15 Dec 2022 12:39:55 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:58599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5sD2-000300-KJ for 60015@debbugs.gnu.org; Thu, 15 Dec 2022 12:39:53 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 9EB7920002; Thu, 15 Dec 2022 17:39:43 +0000 (UTC) In-Reply-To: <83v8mck3a5.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 15 Dec 2022 19:03:30 +0200") 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:251126 Archived-At: >> Is this not something that can be solved in set-minibuffer-message, like >> this: >> >> diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el >> index 6e42296e7ba..c10a6401180 100644 >> --- a/lisp/minibuffer.el >> +++ b/lisp/minibuffer.el >> @@ -817,6 +817,11 @@ set-minibuffer-message >> ;; Make sure we can put-text-property. >> (copy-sequence message) >> (concat " [" message "]"))) >> + (let ((window-lines (window-height minibuf-window)) >> + (message-lines (length (split-string message "\n")))) >> + (when (> message-lines window-lines) >> + (with-selected-window minibuf-window >> + (enlarge-window (- message-lines window-lines))))) >> (unless (or (null minibuffer-message-properties) >> ;; Don't overwrite the face properties the caller has set >> (text-properties-at 0 message)) > > This won't catch the case of a single very long line (which wraps to > produce several screen lines). Testing shows that it doesn't handle wrapped lines. > Also, unconditionally enlarging the mini-window is not a good idea > because it might already be tall enough. Try the above in the recipe > posted by Juri, but then type "C-c C-c" several times -- doesn't it > keep enlarging the mini-window with each "C-c C-c"? But OTOH it doesn't keep enlarging the mini-window with each "C-c C-c".