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#70038: 29.3.50; Shift up/down in buffer with images on M-x other-window with some fonts Date: Wed, 17 Apr 2024 15:58:08 +0300 Message-ID: <86r0f4gn8f.fsf@gnu.org> 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> <028e677b-6d6b-42b2-95ac-0e0c5d1f3dd1@gmx.at> <86jzl1po87.fsf@gnu.org> <865xwknvhs.fsf@gnu.org> <86bk6aloj7.fsf@gnu.org> <838b8ff4-36f2-476f-acef-6f331867bb1d@gmx.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3328"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 70038@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 17 14:59:18 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 1rx4sg-0000eW-BT for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Apr 2024 14:59:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rx4sG-0008DJ-Da; Wed, 17 Apr 2024 08:58:52 -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 1rx4sE-0008Ct-Q1 for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2024 08:58:50 -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 1rx4sE-0007V1-Gp for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2024 08:58:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rx4sQ-0006lr-T2 for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2024 08:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Apr 2024 12:59:02 +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.171335871725870 (code B ref 70038); Wed, 17 Apr 2024 12:59:02 +0000 Original-Received: (at 70038) by debbugs.gnu.org; 17 Apr 2024 12:58:37 +0000 Original-Received: from localhost ([127.0.0.1]:46030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx4ry-0006it-G7 for submit@debbugs.gnu.org; Wed, 17 Apr 2024 08:58:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx4ru-0006he-5X for 70038@debbugs.gnu.org; Wed, 17 Apr 2024 08:58:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rx4rb-0007Rf-Ob; Wed, 17 Apr 2024 08:58:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Qx9XZYik7vWNZqeS18yUwh+TUD1QNGb8oKYQiw8LkEA=; b=dJBwNamb5snv M5Z6ESqIvqs7YJ3toAXY4leH93ryDMftcnzymdT2ToiNeyug8d9iAKcQ+YCWEF8iA5aEs6c/Sb+oN VBObUucfVN2i5v6b3Cw0wH48s3FnY7Rl7Qn3wLaL/btNkWxK5aDYCVfFfInvIs/wjkMQMBAINb4xI x8sIeNKsigw7NmxN9SfDN0lOs4Fc/QiWGu+JaLMdVtNf2tznOHpX9V3268g2CPXBcTfLy1b1vFSaY ZmD+XansQ2ueNmBFCtQ5ufQOr9gOzdpBX/8xkPSxeDZMidLAvyMkkvEzZv1CnR4t7414qJh7b9alP 0JoNc05pBwdOrI+iGNU9yQ==; In-Reply-To: <838b8ff4-36f2-476f-acef-6f331867bb1d@gmx.at> (message from martin rudalics on Wed, 17 Apr 2024 10:02:12 +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:283488 Archived-At: > Date: Wed, 17 Apr 2024 10:02:12 +0200 > Cc: luangruo@yahoo.com, 70038@debbugs.gnu.org > From: martin rudalics > > > I hope this is now more clear. > > Thanks. So when we enter the part headed by > > if ((w->optional_new_start || window_frozen_p (w)) > > then the single aim is apparently to make sure that the cursor line > remains fully visible. Yes. If it isn't, we will either move point or, if even that is impossible, ignore the request to preserve window-start. > When we enter that part because window_frozen_p (w) is set, we ignore > the scroll margins because we assume that preserving the window start > position is more important in this situation. > > When we enter that part because w->optional_new_start was set, we assume > that the caller ('recenter', 'delete-other-windows-internal') has done > its part to obey the scroll margins but still might have failed to keep > the cursor visible. > > Is that interpretation correct? No, we actually check that point doesn't end up inside scroll margins (search for "Some people insist"), and move point or reject the window-start if it did. > If so, it might make sense to put some > explanation into a comment for that part because, at least for me, it's > a priori not clear that the same treatment is wanted for keeping the > previous start position of a window and for one that has been explicitly > changed. I've spent almost an hour to arrive at the conclusion above. > Things like this comment in 'delete-other-windows-internal' > > /* We need to do this, so that the window-scroll-functions > get called. */ > w->optional_new_start = true; > > were distracting even further. Where would you like to put the comment, and what should that comment say?