From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#60015: 29.0.60; multi-line messages truncated in non-selected minibuffer Date: Thu, 15 Dec 2022 16:44:29 +0000 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19547"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 60015@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 17:45:33 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 1p5rMS-0004q6-Ia for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 17:45:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5rM0-0006sg-RF; Thu, 15 Dec 2022 11:45: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 1p5rLz-0006rw-36 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 11:45: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 1p5rLy-0004la-KT for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 11:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5rLy-0008V4-Fh for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 11:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 16:45: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.167112267432630 (code B ref 60015); Thu, 15 Dec 2022 16:45:02 +0000 Original-Received: (at 60015) by debbugs.gnu.org; 15 Dec 2022 16:44:34 +0000 Original-Received: from localhost ([127.0.0.1]:43679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5rLV-0008UE-Lz for submit@debbugs.gnu.org; Thu, 15 Dec 2022 11:44:33 -0500 Original-Received: from heytings.org ([95.142.160.155]:59776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5rLT-0008U8-77 for 60015@debbugs.gnu.org; Thu, 15 Dec 2022 11:44:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1671122670; bh=Ad6CHKaOY8v39Ve3Ro7hnsI0hSld6rO8oBGQL4dgH04=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=jIw5QolqlSdElqFXvjOZ8VmWYieg2NNXQKpR8y/JyJ6lpY9uIcTa3RHyg03vZUloN T8i1u9BPqmhu9h3Lu2Wg/onCTCIGX+WgIFsNsmW1IS3glnSstLCb2xXak3HebnppSp A8KnYOSTNcywwxQPkEkK4IyXeJCYKVeKCvxkD+qMzThnmJqhTQJBD2GxVdG5XQuG7i A0TkHZR5epaEQS3sq0yA5crzT2ubvitjLDKzHmes19McZXjjaKKwmra9F2Ta+LxuyP HYO657T4vPKGAqfYQm9/faMKj88n8yELaT1XiYbM7zc2Y04MLz/QdU49XNDslRA08v 3ppKbJSHmMg2A== In-Reply-To: <86mt7pgkzh.fsf@mail.linkov.net> 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:251118 Archived-At: > > Here is a better test case. Please evaluate: > > (progn > (keymap-global-set "C-c C-c" (lambda () (interactive) (message "abc\ndef"))) > nil) > > Then the bug can be reproduced with just these keys: > > M-x > C-x o > C-c C-c > > Only the top line is displayed in the minibuffer. > 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))