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: Mon, 12 Dec 2022 20:03:41 +0200 Organization: LINKOV.NET Message-ID: <86y1rco5xe.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31733"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) To: 60015@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 12 19:08:28 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 1p4nE4-00080O-GG for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Dec 2022 19:08:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4nDh-0007Dh-SO; Mon, 12 Dec 2022 13:08:05 -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 1p4nDe-0007CW-Jy for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 13:08:03 -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 1p4nDe-00082d-CG for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 13:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4nDe-0001tM-7V for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 13:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Dec 2022 18:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60015 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16708684467252 (code B ref -1); Mon, 12 Dec 2022 18:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Dec 2022 18:07:26 +0000 Original-Received: from localhost ([127.0.0.1]:54458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4nD4-0001su-97 for submit@debbugs.gnu.org; Mon, 12 Dec 2022 13:07:26 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:59548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4nD2-0001so-Hh for submit@debbugs.gnu.org; Mon, 12 Dec 2022 13:07:25 -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 1p4nD2-00078N-DG for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 13:07:24 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4nD0-00080K-SG for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 13:07:24 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 3249410000A for ; Mon, 12 Dec 2022 18:07:17 +0000 (UTC) Received-SPF: pass client-ip=217.70.178.231; envelope-from=juri@linkov.net; helo=relay11.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:250735 Archived-At: --=-=-= Content-Type: text/plain 0. emacs -Q 1. (run-with-timer 5 5 'message "abc\ndef") 2. then activate the minibuffer and switch back to the original buffer 3. after some time observe that only the first line of the multi-line message is displayed in the minibuffer I don't know where this problem comes from, but it's impossible to use edebug to debug minibuffer-related bugs while the minibuffer is active, because only an old message is displayed, not the most recent, when using set-multi-message to collect messages. So here is at least the fix for set-multi-message: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=set-multi-message.patch diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index cfdf2b43f42..36553eca1ad 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -914,6 +914,11 @@ set-multi-message "Return recent messages as one string to display in the echo area. Note that this feature works best only when `resize-mini-windows' is at its default value `grow-only'." + (if (and (active-minibuffer-window) (not (minibufferp))) + ;; Multi-line messages are limited to one line only + ;; when the minibuffer window is active and not selected. + ;; So don't return a multi-line string in this case: + message (let ((last-message (car multi-message-list))) (unless (and last-message (equal message (aref last-message 1))) (when last-message @@ -931,7 +936,7 @@ set-multi-message (setf (nthcdr multi-message-max multi-message-list) nil))) (mapconcat (lambda (m) (aref m 1)) (reverse multi-message-list) - multi-message-separator))) + multi-message-separator)))) (defun clear-minibuffer-message () "Clear minibuffer message. --=-=-=--