From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#67715: 28.2; Minibuffer content is sometimes unexpectedly partially hidden Date: Sat, 09 Dec 2023 10:04:18 +0100 Message-ID: <878r63vjal.fsf@metalevel.at> References: <87plzg5xff.fsf@metalevel.at> <838r64zb3r.fsf@gnu.org> <874jgrvotz.fsf@metalevel.at> <83wmtnyffx.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="39923"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 67715@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 09 10:05:02 2023 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 1rBtGg-000A61-CZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Dec 2023 10:05:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBtGT-0002gk-VS; Sat, 09 Dec 2023 04:04:49 -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 1rBtGS-0002ga-HS for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 04:04:48 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBtGS-0003bW-9F for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 04:04:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBtGf-0003Wy-NE for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 04:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Dec 2023 09:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67715 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 67715-submit@debbugs.gnu.org id=B67715.170211267513524 (code B ref 67715); Sat, 09 Dec 2023 09:05:01 +0000 Original-Received: (at 67715) by debbugs.gnu.org; 9 Dec 2023 09:04:35 +0000 Original-Received: from localhost ([127.0.0.1]:46806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBtGE-0003W3-Se for submit@debbugs.gnu.org; Sat, 09 Dec 2023 04:04:35 -0500 Original-Received: from [78.47.144.35] (port=49888 helo=metalevel.at) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBtGD-0003Vv-Pd for 67715@debbugs.gnu.org; Sat, 09 Dec 2023 04:04:34 -0500 Original-Received: by metalevel.at (Postfix, from userid 1000) id CB25C9C76A; Sat, 9 Dec 2023 10:04:18 +0100 (CET) In-Reply-To: <83wmtnyffx.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Dec 2023 09:59:14 +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:275833 Archived-At: Eli Zaretskii writes: > I don't know. You haven't actually explained what you are trying to > accomplish and why you use this strange way of accomplishing it. Why > not, for example, use the minibuffer-prompt face instead to show the > prompt in a different typeface? In order to automatically explain certain Emacs features, I am using Emacs to simulate interactions that would take place if the user pressed certain keys. For this reason, I have a program that inserts text in the minibuffer, as if the user had typed the text. In the Emacs versions I mentioned, this works as expected: The minibuffer resizes as if the user had typed the text. I noticed that in Emacs versions starting from 28.2, this no longer works. For my use case, this is a regression which I filed as an issue. I filed the issue by following the instructions: Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from 'emacs -Q': I kept the issue to a smallest fragment that exhibits the regression, and it comes as a surprise to me that you now say "You haven't actually explained what you are trying to accomplish and why you use this strange way of accomplishing it", because such an explanation was never asked for and also the instructions for filing an issue do not mention it. Still, I have now provided the explanation and I hope it suffices to explain the concrete use case I have for this feature. If you need to know anything else to improve this case, please ask me. Thank you a lot! > mini-window. When redisplay is inhibited, the code which resizes the > mini-window returns without doing anything. So one way of fixing this > would be to try to avoid with-selected-window, and instead use some > other way of achieving what you want to do. I have now tried various ways to resize the minibuffer in the situation I posted, and so far found no way to do it. I am including a snippet that uses fit-window-to-buffer, and does not use with-selected-window, and still the text in the minibuffer is not fully visible. I have also changed attributes of minibuffer-prompt, and they seem to have no effect on the case I posted: In my use case, I deliberately use a larger face so that the simulated minibuffer interaction is more easily readable. If there is any other way I should try, or any way to get the minibuffer to show the entire buffer content in the situation I mentioned, please let me know any time, I would greatly appreciate your help with this. Thank you a lot, Markus (let ((f (selected-frame))) (with-selected-frame (make-frame) (switch-to-buffer (get-buffer-create "other"))) (select-frame-set-input-focus f) (let ((win (get-buffer-window "other" t))) (when win (with-selected-window win (recenter 0))) (let ((w (selected-window))) (unwind-protect (progn (select-window (minibuffer-window)) (setq-local face-remapping-alist `((default :height 2.0))) (fit-window-to-buffer) (insert "hello") (read-key)) (erase-buffer)) (select-window w))))