From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70038: 29.3.50; Shift up/down in buffer with images on M-x other-window with some fonts Date: Mon, 8 Apr 2024 11:07:50 +0200 Message-ID: <028e677b-6d6b-42b2-95ac-0e0c5d1f3dd1@gmx.at> References: <87ttkrl8w1.fsf@gmail.com> <86zfuihp7t.fsf@gnu.org> <87bk6yl4hu.fsf@gmail.com> <8734sal2bc.fsf@gmail.com> <87wmpm2rd7.fsf@zohomail.eu> <86bk6m3c20.fsf@gnu.org> <867cha37of.fsf@gnu.org> <3ee13fbd-2ba0-4fca-b5ed-b61f1d8dc527@gmx.at> <864jcd1qok.fsf@gnu.org> <8634rx1kfb.fsf@gnu.org> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6739"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: luangruo@yahoo.com, rahguzar@zohomail.eu, r.diaz@uam.es, rdiaz02@gmail.com, 70038@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 08 11:09:27 2024 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 1rtl0D-0001O8-So for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Apr 2024 11:09:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtkzr-0003S4-PW; Mon, 08 Apr 2024 05:08:59 -0400 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 1rtkzq-0003Ra-9M for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2024 05:08:58 -0400 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 1rtkzp-0007jZ-TB for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2024 05:08:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtkzw-0006Xe-Ob for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2024 05:09:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Apr 2024 09:09:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70038 X-GNU-PR-Package: emacs Original-Received: via spool by 70038-submit@debbugs.gnu.org id=B70038.171256729424888 (code B ref 70038); Mon, 08 Apr 2024 09:09:04 +0000 Original-Received: (at 70038) by debbugs.gnu.org; 8 Apr 2024 09:08:14 +0000 Original-Received: from localhost ([127.0.0.1]:45255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtkz7-0006TM-Rz for submit@debbugs.gnu.org; Mon, 08 Apr 2024 05:08:14 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:60489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtkz4-0006Se-PZ for 70038@debbugs.gnu.org; Mon, 08 Apr 2024 05:08:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1712567272; x=1713172072; i=rudalics@gmx.at; bh=ejExP7jPexy1WEnhmkg0WfkcX0V/0ULMZ2t3QXamoi8=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=ZbJpf0f8c+uixM7eXClO0DZjsOEwP+JEPkLGtyrTltZa+eKXdV7mRn3KuIdEkKtg gTmZswDr85TqyfhmezTjVAVsoOEJkqFEfwtcu4s5y0zxXiGPzHsJDg9Ib5XIt9AFy M+ehcYiIkWJtJ9l8M1wqMXtK7I2GjrMbjEuxdaX9YMUF8B8ROwBjm47CKxLxS46BG 4n90xkPDIuGhTGhY47QiNlHS/SUkl3aPMXf4s8GHyzMG4eyDeIgV1o5pDaBq2yHT0 lVAKkJHqqMFlVhXJCcnFhBb30LN55GPSMqTS+xVucPKAFeLAKjI6STbWjTIpj6W0J abkX4RmdXEsAFgmLHg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([213.142.96.162]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MzQkE-1sg4DI00zA-00vPmJ; Mon, 08 Apr 2024 11:07:52 +0200 Content-Language: en-US In-Reply-To: <8634rx1kfb.fsf@gnu.org> X-Provags-ID: V03:K1:PGWMVQah4nOnxC8gH7SayNqZoDveX2USHjKGGnol3Ou2btEtgih +722EU4UlBld+ftOSSoD+lXiHuzLHqslA8yWBVjfo16wAOqyIsMYYvaayuVBHBplSJ+HLG0 9bNe70CO40rA2rNgFRMrsClHiC139vCteT+X23QbscGES2dsCco1NQYlDJ0um+esDBKPKTj 0dGFjpKgAsL0mr153zF7g== UI-OutboundReport: notjunk:1;M01:P0:QS/XmeP1OgU=;xlTefpvaGES9V5HKzs3tw+ODHrK ZkpO6dSxdbd7DF3eGSIO3Que1ebNSQ2MwRmoDm6Ks0JesCluDoJNKKg0WucP2NQJM3vTX+yz7 JuQTcwKi7FEi3WQcEAyQjclKn3D2Vp/JUqDtLnQOX5K5ESR2gKyMmqrs0Ta4mjb0z4CP7um88 Vb3nvHdMykmHZEnw0hGgd8YbirlJhaiwicyNtOZqVc/pm4/9sT65m8f9nYEb1tZv+9FH3QuKf UZW4/xh7G2XyX4f/kBw5/XqpZXLIk99L8lqaZ4PglBO7bvgNiHi38bH0CJ/DkLOYbKuA+H8ut JWmZJwa7fYRdopMAA6v1dbfqWj9xve5LLlx0Ntv0kGaLsTrVVqTOA5ogfp6JK2PNeri6QS5+u vod6ZIPL9DHl8skRYZXMv3WsDgkJsCGCMLBR3450cBJKO7iS/BhCaOTDTsb7q1Skq5vG0ok0+ 8EANVqYOE8IZSRYuktoILOrG22kOI77S//mm/d7oBRRt5Pd3V14lpD8qLryVDZHWfLu1GNMD7 Hvn3l2RiRfOaLzdJ2UPbeIFdnPzj/5MEh8mQqXel8oCJYfT154x+SBEwwPMDZuYd+gHi5VuGL XeFUOdqEFTTSeFzDAN+pi8DEcdaWYiOWgT6AbLPAO0mjgOEyDlwp/S99VJoAI7Qj5BrtEhMsF c7SESmt4EbXXzbt+0uj728egeMIO45LX0a9o0pRzflFbHVrDVcnW17U7QzouJeaA6KDgsyMvH zLroEMa0c7+mw/Drl+P3STuJn3pUL7JwydmJf3bHacRh+EIp2DenBC5Th2MmgL3awYpkprjS 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:282920 Archived-At: IIUC the basic idea of all this is to preserve window start positions when enlarging a mini window unless that would move a window's point outside that window. Once upon a time, resize_mini_window used window configurations to get back the previous start positions but that was maybe considered too costly and Gerd decided to "Don't save window configuration, freeze window starts instead." A possibly heretical question is in which way freezing start positions permanently can harm. IIUC, after a minibuffer interaction, currently the only way to unfreeze start positions is to resize the minibuffer window and trigger the corresponding call in shrink_mini_window. But setting the start position of any window while a minibuffer interaction is going on seems to work here without problems. Let's assume it can harm: >> If the only >> problem is that of restore_window_configuration, then minibuffer_unwind >> looks like the right place. That was silly. minibuffer_unwind seems to care only about replacing one minibuffer with another. read_minibuf_unwind already should handle this here (don't ask me what a future_mini_window is) /* When we get to the outmost level, make sure we resize the mini-window back to its normal size. */ if (minibuf_level == 0 || !EQ (selected_frame, WINDOW_FRAME (XWINDOW (future_mini_window)))) resize_mini_window (XWINDOW (minibuf_window), 0); The only problem is that if the mini window was _not_ enlarged, shrink_mini_window won't unfreeze starts. Unconditionally unfreezing start positions there as I mentioned in my first mail should fix that. > Hmm... read_char_help_form_unwind is called after we invoke > help-form-show, and that one pops up a special buffer: > > (defun help-form-show () > "Display the output of a non-nil `help-form'." > (let ((msg (eval help-form t))) > (if (stringp msg) > (with-output-to-temp-buffer " *Char Help*" > (princ msg))))) > > Is there a way to make that use the echo-area? if so, can you tell how > to do that? IIUC that is called in a situation where the minibuffer is active. Showing that text in the echo area (albeit shortly) doesn't look like TRT to me. IIUC read_char can resize the mini window here if (minibuf_level && EQ (minibuf_window, echo_area_window) /* The case where minibuffer-message-timeout is a number was already handled near the beginning of command_loop_1. */ && !NUMBERP (Vminibuffer_message_timeout)) resize_mini_window (XWINDOW (minibuf_window), false); so this should be covered by read_minibuf_unwind already. martin