From unknown Sat Aug 16 21:19:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46718: 27.1; truncate-lines in minibuffer prevents auto resize Resent-From: Clemens Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Feb 2021 13:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 46718@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161408787414921 (code B ref -1); Tue, 23 Feb 2021 13:45:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Feb 2021 13:44:34 +0000 Received: from localhost ([127.0.0.1]:58547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEXzO-0003sb-G0 for submit@debbugs.gnu.org; Tue, 23 Feb 2021 08:44:34 -0500 Received: from lists.gnu.org ([209.51.188.17]:32876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEXzN-0003sU-KC for submit@debbugs.gnu.org; Tue, 23 Feb 2021 08:44:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEXzN-00089n-Bu for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2021 08:44:33 -0500 Received: from mout01.posteo.de ([185.67.36.65]:57303) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEXzL-0007CI-13 for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2021 08:44:33 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 943ED16005C for ; Tue, 23 Feb 2021 14:44:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1614087861; bh=jqICCUOuRK9k9SxxR6w8FSfoWwfEk7k5U5Dr8/OFZ5c=; h=To:Subject:From:Date:From; b=ml5iPDNXsxMq6DbSjfrxmZ75EQSvmpnleN11LKWUJrFE7Am475Rh5U1Zt4tjpqHHS W8SX/xT7AzXRVZR5Xh0TFjHVlzOsEyB1Eqo+anmuBmL/NpDH0ebUeGJIbaPQRL7L5k U3GMFR+dDJf941EQS2DWIXXXfYZLXh4T2E9Naha9UBuioDpyOlRUkutFjcjixUo88I WbsciwdKr28FW1qLsQqzwKxoUVR7VLmtEAKecGTjZxKIUKLnkeIbWEhgaAyBMQe31w GAdGLkdeV2eW20r6beRN7cZuHFwfOXrOwgnT2V51RxHhk64jl6+zlFK9jvwFiYeoQT LH7Kt/Ta1I04w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DlKz90HQXz6tmL for ; Tue, 23 Feb 2021 14:44:20 +0100 (CET) From: Clemens Message-ID: Date: Tue, 23 Feb 2021 14:44:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=185.67.36.65; envelope-from=clemera@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, in Selectrum we are using an overlay after-string to display completion candidates within the minibuffer. We also want to truncate-lines to prevent wrapping for long lines. When using: ;; 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. From unknown Sat Aug 16 21:19:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46718: 27.1; truncate-lines in minibuffer prevents auto resize 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 X-GNU-PR-Keywords: To: Clemens Cc: 46718@debbugs.gnu.org Received: via spool by 46718-submit@debbugs.gnu.org id=B46718.161418178829919 (code B ref 46718); Wed, 24 Feb 2021 15:50:02 +0000 Received: (at 46718) by debbugs.gnu.org; 24 Feb 2021 15:49:48 +0000 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 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 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 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 Date: Wed, 24 Feb 2021 17:49:22 +0200 Message-Id: <83im6htqil.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Clemens on Tue, 23 Feb 2021 14:44:20 +0100) References: X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. From unknown Sat Aug 16 21:19:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46718: 27.1; truncate-lines in minibuffer prevents auto resize Resent-From: Clemens Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2021 16:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 46718@debbugs.gnu.org Received: via spool by 46718-submit@debbugs.gnu.org id=B46718.161418278431540 (code B ref 46718); Wed, 24 Feb 2021 16:07:02 +0000 Received: (at 46718) by debbugs.gnu.org; 24 Feb 2021 16:06:24 +0000 Received: from localhost ([127.0.0.1]:35548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEwgB-0008Ce-IS for submit@debbugs.gnu.org; Wed, 24 Feb 2021 11:06:23 -0500 Received: from mout02.posteo.de ([185.67.36.66]:44135) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEwfu-0008Bw-Qf for 46718@debbugs.gnu.org; Wed, 24 Feb 2021 11:06:22 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B21DE2400FE for <46718@debbugs.gnu.org>; Wed, 24 Feb 2021 17:06:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1614182760; bh=uKt9Nb3xEwV6CsJhoUpey0SSpeegkh0efZkyvnY48c0=; h=Subject:To:Cc:From:Date:From; b=oc8ViJCYZehUVFkuQDyhR6IJ/Icu1tl/suODs7F6mq84N7a0QXyTOGgh6KSD4gn/1 WCdHJqO6f/xOyJAWBvhmCvd2HKG5w3rvFWrrorOWrKtpwA7YhgmoHnrelBIS3BC0I7 SwcC/VoWzp1GGYQDTbN9OvrafkVm2bK+4BVhWskgGGgMkR8wjG3Sjd2rVIXykKsQzo UsYYdOk5iQjjYL1KpQljsLMBlXNAzG5TSD5pirUALqwbECHDEDOZ/kQ7W95YFiDFng 3sM1NLjqIL1LrV6R7+GkP1WWOz/57hgKT4PbIHQULt4G+23m2pZ9t2c9xj+9rOm69U 66V5xaPpyDiug== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Dm148112sz9rxp; Wed, 24 Feb 2021 17:05:59 +0100 (CET) References: <83im6htqil.fsf@gnu.org> From: Clemens Message-ID: <6e0bcddb-fbda-1f8a-c4b8-74abf6c243b3@posteo.net> Date: Wed, 24 Feb 2021 17:05:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <83im6htqil.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. I understand the assumption, makes sense when not considering such weird use cases as we might have in Selectrum ;) In Selectrum candidates are shown vertically stacked, we additionally ensure that candidates are a single line. It works pretty well and makes a lot of things easier to deal with in our UI. Thanks for adding this! From unknown Sat Aug 16 21:19:24 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Clemens Subject: bug#46718: closed (Re: bug#46718: 27.1; truncate-lines in minibuffer prevents auto resize) Message-ID: References: <83ft1ltofa.fsf@gnu.org> X-Gnu-PR-Message: they-closed 46718 X-Gnu-PR-Package: emacs Reply-To: 46718@debbugs.gnu.org Date: Wed, 24 Feb 2021 16:35:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1614184502-10363-1" This is a multi-part message in MIME format... ------------=_1614184502-10363-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #46718: 27.1; truncate-lines in minibuffer prevents auto resize which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 46718@debbugs.gnu.org. --=20 46718: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D46718 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1614184502-10363-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 46718-done) by debbugs.gnu.org; 24 Feb 2021 16:35:01 +0000 Received: from localhost ([127.0.0.1]:35688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEx7s-0002go-Qr for submit@debbugs.gnu.org; Wed, 24 Feb 2021 11:35:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEx7q-0002gZ-62 for 46718-done@debbugs.gnu.org; Wed, 24 Feb 2021 11:34:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37062) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEx7k-000837-Ge; Wed, 24 Feb 2021 11:34:52 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3427 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lEx7j-0008LI-Fq; Wed, 24 Feb 2021 11:34:52 -0500 Date: Wed, 24 Feb 2021 18:34:33 +0200 Message-Id: <83ft1ltofa.fsf@gnu.org> From: Eli Zaretskii To: Clemens In-Reply-To: <6e0bcddb-fbda-1f8a-c4b8-74abf6c243b3@posteo.net> (message from Clemens on Wed, 24 Feb 2021 17:05:59 +0100) Subject: Re: bug#46718: 27.1; truncate-lines in minibuffer prevents auto resize References: <83im6htqil.fsf@gnu.org> <6e0bcddb-fbda-1f8a-c4b8-74abf6c243b3@posteo.net> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46718-done Cc: 46718-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: 46718@debbugs.gnu.org > From: Clemens > Date: Wed, 24 Feb 2021 17:05:59 +0100 > > I understand the assumption, makes sense when not considering such weird > use cases as we might have in Selectrum ;) In Selectrum candidates are > shown vertically stacked, we additionally ensure that candidates are a > single line. It works pretty well and makes a lot of things easier to > deal with in our UI. Thanks for adding this! You are welcome. Closing. ------------=_1614184502-10363-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Feb 2021 13:44:34 +0000 Received: from localhost ([127.0.0.1]:58547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEXzO-0003sb-G0 for submit@debbugs.gnu.org; Tue, 23 Feb 2021 08:44:34 -0500 Received: from lists.gnu.org ([209.51.188.17]:32876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEXzN-0003sU-KC for submit@debbugs.gnu.org; Tue, 23 Feb 2021 08:44:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEXzN-00089n-Bu for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2021 08:44:33 -0500 Received: from mout01.posteo.de ([185.67.36.65]:57303) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEXzL-0007CI-13 for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2021 08:44:33 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 943ED16005C for ; Tue, 23 Feb 2021 14:44:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1614087861; bh=jqICCUOuRK9k9SxxR6w8FSfoWwfEk7k5U5Dr8/OFZ5c=; h=To:Subject:From:Date:From; b=ml5iPDNXsxMq6DbSjfrxmZ75EQSvmpnleN11LKWUJrFE7Am475Rh5U1Zt4tjpqHHS W8SX/xT7AzXRVZR5Xh0TFjHVlzOsEyB1Eqo+anmuBmL/NpDH0ebUeGJIbaPQRL7L5k U3GMFR+dDJf941EQS2DWIXXXfYZLXh4T2E9Naha9UBuioDpyOlRUkutFjcjixUo88I WbsciwdKr28FW1qLsQqzwKxoUVR7VLmtEAKecGTjZxKIUKLnkeIbWEhgaAyBMQe31w GAdGLkdeV2eW20r6beRN7cZuHFwfOXrOwgnT2V51RxHhk64jl6+zlFK9jvwFiYeoQT LH7Kt/Ta1I04w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DlKz90HQXz6tmL for ; Tue, 23 Feb 2021 14:44:20 +0100 (CET) To: bug-gnu-emacs@gnu.org Subject: 27.1; truncate-lines in minibuffer prevents auto resize From: Clemens Message-ID: Date: Tue, 23 Feb 2021 14:44:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=185.67.36.65; envelope-from=clemera@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, in Selectrum we are using an overlay after-string to display completion candidates within the minibuffer. We also want to truncate-lines to prevent wrapping for long lines. When using: ;; 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. ------------=_1614184502-10363-1--