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#69972: 29.1; Unexpected behavior when scrolling images Date: Sun, 24 Mar 2024 11:42:56 +0200 Message-ID: <86h6gwx8wv.fsf@gnu.org> References: <87sf0gm1xn.fsf@ushin.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39755"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69972@debbugs.gnu.org To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 24 10:43:49 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 1roKOL-000ABg-2S for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Mar 2024 10:43:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1roKNt-0005vg-P0; Sun, 24 Mar 2024 05:43:21 -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 1roKNs-0005vY-Qs for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2024 05:43:20 -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 1roKNs-0006Vd-J3 for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2024 05:43:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1roKOX-0005wL-T4 for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2024 05:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Mar 2024 09:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69972 X-GNU-PR-Package: emacs Original-Received: via spool by 69972-submit@debbugs.gnu.org id=B69972.171127342922791 (code B ref 69972); Sun, 24 Mar 2024 09:44:01 +0000 Original-Received: (at 69972) by debbugs.gnu.org; 24 Mar 2024 09:43:49 +0000 Original-Received: from localhost ([127.0.0.1]:44390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roKOL-0005vW-4q for submit@debbugs.gnu.org; Sun, 24 Mar 2024 05:43:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roKOJ-0005v8-8F for 69972@debbugs.gnu.org; Sun, 24 Mar 2024 05:43:47 -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 1roKNX-0006U8-KZ; Sun, 24 Mar 2024 05:42:59 -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=kaHOQCUJVgzKDtBura48NOs2pwEtxR/c0yzgHPsyfKU=; b=dVxyPPOgq8kL 1ceB5miqy8CW9UBO3piMowooxRrTUOXPW0t7E2n272GM9T9IBqh6Hchi3UbgNBOxQtlPp9Xa/QcZ5 AzE4d0p4j871wCilnQPaiithjsyrWoeVAImOUga0oS2Twmm71+8xMTNRH/TboLedNsFFEIMWZ+55E 4UYugooN9BE3FZPLLss2AzY/9y6C+7tUxN98fl0Cytp2HOpq2YqJGttbQ45A9KnmBX3KBtUa5VVRi +qRL3HP3oZoskZnhdtvFKF4IFfnV2XkHNDigU4I0vsYDeq6+iR56AQ4mIT0xAVQ+ioSKYY38TxLkr bkr137Rkl/SaRlMjVBsm+Q==; In-Reply-To: <87sf0gm1xn.fsf@ushin.org> (bug-gnu-emacs@gnu.org) 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:282017 Archived-At: > Date: Sun, 24 Mar 2024 02:07:16 -0700 > From: Joseph Turner via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > When the image at point is larger than the current window and there is > no content after the image, interactively scrolling down (with the > scroll-up command) unexpectedly scrolls past the image to blankness. I cannot reproduce this, I think. > Test this by evaluating the following snippet then interactively running > `scroll-up' repeatedly: > > (with-current-buffer (get-buffer-create "*test-scroll-image*") > (erase-buffer) > (insert-image (create-image "splash.png" nil nil > ;; Scale the image more if it doesn't take up the whole window. > :scale 5)) > (goto-char (point-max)) > (pop-to-buffer (current-buffer))) This recipe doesn't include the call to scroll-up, so I'm unsure how you did that and what you saw. When I try "M-: (scroll-up) RET" or "M-x scroll-up RET", I get several scrolls by window-size, and then "End of buffer" error when I hit the end of the buffer. If this is unexpected, please tell why. > Even more unexpectedly, when point is before the image, running > `scroll-up' repeatedly eventually scrolls back to the top of the image: > > (with-current-buffer (get-buffer-create "*test-scroll-image*") > (erase-buffer) > (insert-image (create-image "splash.png" nil nil :scale 5)) > (goto-char (point-min)) > (pop-to-buffer (current-buffer))) I do see this, but why is that a problem? You supposed to use scroll-up-command instead, which handles these marginal cases much better. scroll-up itself is not smart enough to avoid the perceived "scroll back to top", which is actually caused by the fact that we zero out window-vscroll (which is how we handle scrolling past large images).