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#46718: 27.1; truncate-lines in minibuffer prevents auto resize Date: Wed, 24 Feb 2021 17:49:22 +0200 Message-ID: <83im6htqil.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19382"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46718@debbugs.gnu.org To: Clemens Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 24 16:54:04 2021 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 1lEwUF-0004ua-5J for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Feb 2021 16:54:03 +0100 Original-Received: from localhost ([::1]:53786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEwUE-0003wn-7D for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Feb 2021 10:54:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEwQT-0000RA-8u for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 10:50:09 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52213) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lEwQM-000849-QZ for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 10:50:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lEwQM-0007nK-PR for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 10:50: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: Wed, 24 Feb 2021 15:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46718 X-GNU-PR-Package: emacs Original-Received: via spool by 46718-submit@debbugs.gnu.org id=B46718.161418178829919 (code B ref 46718); Wed, 24 Feb 2021 15:50:02 +0000 Original-Received: (at 46718) by debbugs.gnu.org; 24 Feb 2021 15:49:48 +0000 Original-Received: from localhost ([127.0.0.1]:35522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEwQ8-0007mU-5y for submit@debbugs.gnu.org; Wed, 24 Feb 2021 10:49:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEwQ5-0007mF-I2 for 46718@debbugs.gnu.org; Wed, 24 Feb 2021 10:49:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36127) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEwQ0-0007us-11; Wed, 24 Feb 2021 10:49:40 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4651 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lEwPz-0004zQ-Dn; Wed, 24 Feb 2021 10:49:39 -0500 In-Reply-To: (message from Clemens on Tue, 23 Feb 2021 14:44:20 +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" Xref: news.gmane.io gmane.emacs.bugs:200721 Archived-At: > From: Clemens > Date: Tue, 23 Feb 2021 14:44:20 +0100 > > ;; emacs -Q > (setq resize-mini-windows t) > (minibuffer-with-setup-hook > (lambda () > (setq-local truncate-lines t) > (let ((ov (make-overlay (point-max) (point-max))) > (minibuf-after-string " \nOne\nTwo\nThree")) > (put-text-property 0 1 'cursor t minibuf-after-string) > (overlay-put ov 'after-string minibuf-after-string))) > (read-string ":")) > > the mini window will not resize but when commenting out the setting for > truncate-lines it resizes appropriately. This is (was) not supported. When truncate-lines is non-nil in the minibuffer, Emacs assumed the minibuffer text is just one line. And I can understand that assumption: frankly, setting truncate-lines with multi-line text in the minibuffer makes little sense, because it means some of the text will not be shown, something that contradicts the very purpose of resizing the mini-window. Why would someone do something weird like that? Anyway, I've made this work as expected on the master branch now.