GNU logs - #69972, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69972: 29.1; Unexpected behavior when scrolling images
Resent-From: Joseph Turner <joseph@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 24 Mar 2024 09:13:02 +0000
Resent-Message-ID: <handler.69972.B.171127154816790 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 69972
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 69972 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.171127154816790
          (code B ref -1); Sun, 24 Mar 2024 09:13:02 +0000
Received: (at submit) by debbugs.gnu.org; 24 Mar 2024 09:12:28 +0000
Received: from localhost ([127.0.0.1]:42543 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1roJtz-0004Mj-TX
	for submit <at> debbugs.gnu.org; Sun, 24 Mar 2024 05:12:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:34340)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joseph@HIDDEN>) id 1roJtw-0004MS-Nl
 for submit <at> debbugs.gnu.org; Sun, 24 Mar 2024 05:12:25 -0400
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 <joseph@HIDDEN>) id 1roJr8-0001KU-Me
 for bug-gnu-emacs@HIDDEN; Sun, 24 Mar 2024 05:09:30 -0400
Received: from out-187.mta1.migadu.com ([95.215.58.187])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <joseph@HIDDEN>) id 1roJr5-000051-DA
 for bug-gnu-emacs@HIDDEN; Sun, 24 Mar 2024 05:09:30 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ushin.org; s=key1;
 t=1711271354;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=Ivd04cmhLo/ExNa7uq/Dma3fExN/pp5NXnSA/C95Tig=;
 b=bqn+1RdOwDd9biUU1S8xwaSp//Rn0d5cIe6f6Kg9/xTtJgTdhf1QbnaoGL0mlU/gMtO43w
 2Sd+cYpYwNZN+cOtDuVsQU82DLIvbTFuzTRdQs1cX/JAJs6hKWeZyjGFKfUzKzyxwm0yHP
 Ta7SHBWkeUHYkOfx6/pBLQy0pYVbjnUGQ3P/CLBBaiuobSHv+roHILu/phAPiz/DlNd3jq
 z/QTWAgboQHAS5KszplHMGAcri/enU4WhQtahBpmPyYPRxKZ/8YFHYads9wKNVCby5F4B/
 3TC4guIjztcQjGP+TJilf0kGHbZIyoLXIcWcJIZ1DyPypQjLedCKeQxZJRTNxQ==
From: Joseph Turner <joseph@HIDDEN>
Date: Sun, 24 Mar 2024 02:07:16 -0700
Message-ID: <87sf0gm1xn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
Received-SPF: pass client-ip=95.215.58.187; envelope-from=joseph@HIDDEN;
 helo=out-187.mta1.migadu.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

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.

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)))

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)))

Non-interactively, scroll-up scrolls the page down to the very bottom of
the image.  IMO this is the expected behavior:

(with-current-buffer (get-buffer-create "*test-scroll-image*")
  (erase-buffer)
  (insert-image (create-image "splash.png" nil nil :scale 5))
  (pop-to-buffer (current-buffer))
  (scroll-up 999))

Thank you for your help!!

Joseph

Tested on emacs -Q:

In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16/bin/bash
 SHELL=/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16/bin/bash
 --prefix=/gnu/store/f4gxh8n3libmywq8d5jvxxkyqblgilxy-emacs-29.1
 --enable-fast-install --with-cairo --with-modules
 --with-native-compilation=aot --disable-build-details'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM
GTK3 ZLIB




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Joseph Turner <joseph@HIDDEN>
Subject: bug#69972: Acknowledgement (29.1; Unexpected behavior when
 scrolling images)
Message-ID: <handler.69972.B.171127154816790.ack <at> debbugs.gnu.org>
References: <87sf0gm1xn.fsf@HIDDEN>
X-Gnu-PR-Message: ack 69972
X-Gnu-PR-Package: emacs
Reply-To: 69972 <at> debbugs.gnu.org
Date: Sun, 24 Mar 2024 09:13:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 69972 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
69972: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69972
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69972: 29.1; Unexpected behavior when scrolling images
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 24 Mar 2024 09:44:01 +0000
Resent-Message-ID: <handler.69972.B69972.171127342922791 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 69972
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Joseph Turner <joseph@HIDDEN>
Cc: 69972 <at> debbugs.gnu.org
Received: via spool by 69972-submit <at> debbugs.gnu.org id=B69972.171127342922791
          (code B ref 69972); Sun, 24 Mar 2024 09:44:01 +0000
Received: (at 69972) by debbugs.gnu.org; 24 Mar 2024 09:43:49 +0000
Received: from localhost ([127.0.0.1]:44390 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1roKOL-0005vW-4q
	for submit <at> debbugs.gnu.org; Sun, 24 Mar 2024 05:43:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37238)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1roKOJ-0005v8-8F
 for 69972 <at> debbugs.gnu.org; Sun, 24 Mar 2024 05:43:47 -0400
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 <eliz@HIDDEN>)
 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==;
Date: Sun, 24 Mar 2024 11:42:56 +0200
Message-Id: <86h6gwx8wv.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87sf0gm1xn.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
References: <87sf0gm1xn.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> 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" <bug-gnu-emacs@HIDDEN>
> 
> 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).





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69972: 29.1; Unexpected behavior when scrolling images
Resent-From: Joseph Turner <joseph@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 25 Mar 2024 01:20:02 +0000
Resent-Message-ID: <handler.69972.B69972.171132958919731 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 69972
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 69972 <at> debbugs.gnu.org
Received: via spool by 69972-submit <at> debbugs.gnu.org id=B69972.171132958919731
          (code B ref 69972); Mon, 25 Mar 2024 01:20:02 +0000
Received: (at 69972) by debbugs.gnu.org; 25 Mar 2024 01:19:49 +0000
Received: from localhost ([127.0.0.1]:47648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1roZ08-00058A-MD
	for submit <at> debbugs.gnu.org; Sun, 24 Mar 2024 21:19:49 -0400
Received: from out-182.mta0.migadu.com ([91.218.175.182]:11705)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joseph@HIDDEN>) id 1roZ06-00057w-PU
 for 69972 <at> debbugs.gnu.org; Sun, 24 Mar 2024 21:19:47 -0400
References: <87sf0gm1xn.fsf@HIDDEN> <86h6gwx8wv.fsf@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ushin.org; s=key1;
 t=1711329537;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=Cb0MGakS+Um3KfORzYPAd9i7rUWl5RAmpW7Ucwvjjls=;
 b=FbCcABfu7Wr9EvAY9Pt4JWfpkvjiZyCZ2Doe1R/PpKdBWXlSIbEIzu3fhKIsJnZorEPFM9
 BCnymR4XD+yjJjDjlwDO0ssrVvdjUfON1Br2o5M+R3Udntg5X+N6/TrYrzSQc+FmSjEaKl
 o+rlVRa/3IAb/TexyoOq4K+UcVM4C7kD+ebuH1oxjPzcS46tsxvnlKsIUAhi5ECHdDc04n
 yywfDmYr/g2H6w6usVkZ2QharXpFv4GSM0h3aZc1y6H8EO4BlWhufZnQHN0jNX2bHmSlPE
 XP+MrTjYk+bSUGSMM402ew+v91HSqrgeuL8UTE8Y2Cip+chajtMRTUC6kY1feg==
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
From: Joseph Turner <joseph@HIDDEN>
Date: Sun, 24 Mar 2024 18:06:44 -0700
In-reply-to: <86h6gwx8wv.fsf@HIDDEN>
Message-ID: <87jzlrm7lv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Eli Zaretskii <eliz@HIDDEN> writes:

>> 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" <bug-gnu-emacs@HIDDEN>
>>
>> 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.

On my machine, I don't get "End of buffer" error.  I tested three
different ways in the following snippet

(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))
  (pixel-scroll-precision-mode -1)  ; Ensure mouse wheel scroll up and down works
  (pop-to-buffer (current-buffer)))

1. "M-: (scroll-up) RET" (repeatedly)
2. C-v (repeatedly)
3. <wheel-down> (repeatedly)

With all three methods, at first Emacs gradually scrolls the image, but
then when I reach the bottom of the image, the image disappears entirely
as Emacs scrolls past it all at once.

>> 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).

You're right.  This is not a problem in practice.  When point is before
the image, both C-v and <wheel-down> produce the same behavior as above.

Joseph




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69972: 29.1; Unexpected behavior when scrolling images
Resent-From: Joseph Turner <joseph@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 25 Mar 2024 08:38:02 +0000
Resent-Message-ID: <handler.69972.B69972.171135583013340 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 69972
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>, 69972 <at> debbugs.gnu.org
Received: via spool by 69972-submit <at> debbugs.gnu.org id=B69972.171135583013340
          (code B ref 69972); Mon, 25 Mar 2024 08:38:02 +0000
Received: (at 69972) by debbugs.gnu.org; 25 Mar 2024 08:37:10 +0000
Received: from localhost ([127.0.0.1]:47881 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rofpN-0003T5-Nr
	for submit <at> debbugs.gnu.org; Mon, 25 Mar 2024 04:37:10 -0400
Received: from out-178.mta1.migadu.com ([95.215.58.178]:19756)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joseph@HIDDEN>) id 1rofpJ-0003Sa-KP
 for 69972 <at> debbugs.gnu.org; Mon, 25 Mar 2024 04:37:08 -0400
References: <87sf0gm1xn.fsf@HIDDEN> <86h6gwx8wv.fsf@HIDDEN>
 <87jzlrm7lv.fsf@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ushin.org; s=key1;
 t=1711355747;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=9BXv9q7WePLnZhggOhGplF4tL3m7M/4gbvCSvq5L5Cs=;
 b=UNrvdbX5gN4lJdotIY03PukCndEQJBXrkFLQjM9GaaJb7EMVvQ1Z00LJ0/r7r+6JBtbvaE
 kX2iLVPe4hlcAW+Je3YGRvkIX4UEq3TVvI6pZaYfChdIoMYgU5NadRi6xqw8GTn4KOzvTD
 lGJ507IMmqVvzDoKlLGXtCf6WRnwbEPNaATR4GnGdm8oFE+E87P45lM4KI2HpjUMShvuGO
 1NKT34t4haRU+30VtaIWdEujQi4RkuqoNZAdllBY/3JEaBi7Ky4+NP9U55SLGkUnCPaB+q
 +QdZ88fll2jd+8+BOe6lHQNz3QeNRRaztj3GikFN4Tfo87XRNr7skh9yfT+Ttw==
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
From: Joseph Turner <joseph@HIDDEN>
Date: Mon, 25 Mar 2024 01:34:40 -0700
In-reply-to: <87jzlrm7lv.fsf@HIDDEN>
Message-ID: <874jcun1y9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Joseph Turner <joseph@HIDDEN> writes:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
>>> 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" <bug-gnu-emacs@HIDDEN>
>>>
>>> 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.
>
> On my machine, I don't get "End of buffer" error.

Correction - I *do* get "End of buffer" error, but only after fully
scrolling past the image (which IMO is unexpected).

> I tested three different ways in the following snippet
>
> (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))
>   (pixel-scroll-precision-mode -1)  ; Ensure mouse wheel scroll up and down works
>   (pop-to-buffer (current-buffer)))
>
> 1. "M-: (scroll-up) RET" (repeatedly)
> 2. C-v (repeatedly)
> 3. <wheel-down> (repeatedly)
>
> With all three methods, at first Emacs gradually scrolls the image, but
> then when I reach the bottom of the image, the image disappears entirely
> as Emacs scrolls past it all at once.
>
>>> 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).
>
> You're right.  This is not a problem in practice.  When point is before
> the image, both C-v and <wheel-down> produce the same behavior as above.
>
> Joseph





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69972: 29.1; Unexpected behavior when scrolling images
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 25 Mar 2024 16:00:04 +0000
Resent-Message-ID: <handler.69972.B69972.171138235814312 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 69972
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Joseph Turner <joseph@HIDDEN>
Cc: 69972 <at> debbugs.gnu.org
Received: via spool by 69972-submit <at> debbugs.gnu.org id=B69972.171138235814312
          (code B ref 69972); Mon, 25 Mar 2024 16:00:04 +0000
Received: (at 69972) by debbugs.gnu.org; 25 Mar 2024 15:59:18 +0000
Received: from localhost ([127.0.0.1]:35773 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1romjF-0003if-LH
	for submit <at> debbugs.gnu.org; Mon, 25 Mar 2024 11:59:18 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41486)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1romjD-0003iB-82
 for 69972 <at> debbugs.gnu.org; Mon, 25 Mar 2024 11:59:16 -0400
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 <eliz@HIDDEN>)
 id 1rojMR-000349-W3; Mon, 25 Mar 2024 08:23:32 -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=qyiQDdSntXFGTGogNnd9DWRbP3d+qfvfi5czJuUPifM=; b=WUcPFkf5OdTm
 t//DxlmBPxotiC53AyxSDnMY1khUQ8NNEtW+FvstZOeZVTVX5qtWgMIFkC+I79KwPLH4ZkGEQk2f4
 xuSlXDjUfHYkqPTU1y2qeCcEMfOO71WdqQLFsQxWGj0abTOnhhol91+5fqESPVQnWqcJ89/8LGZcV
 XL6RZ8eWQiF1pTc7RtI4Mzs4hkaWYxDTm22g1U9kUoQWcmu2UgzfNCmuC00+VMhA0Rt4eQTfiIbms
 VVEEvYRkOG1yiYq3PchdcJ3kiFbPLV6SM+zcdQczE10dyG9/TdQoBsuB9bKu3sphKsfv+5rgItREl
 05yTwS6WKw2vFAMuq22KQg==;
Date: Mon, 25 Mar 2024 14:23:28 +0200
Message-Id: <86plvijy9r.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87jzlrm7lv.fsf@HIDDEN> (message from Joseph Turner on Sun, 24
 Mar 2024 18:06:44 -0700)
References: <87sf0gm1xn.fsf@HIDDEN> <86h6gwx8wv.fsf@HIDDEN>
 <87jzlrm7lv.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Joseph Turner <joseph@HIDDEN>
> Cc: 69972 <at> debbugs.gnu.org
> Date: Sun, 24 Mar 2024 18:06:44 -0700
> 
> (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))
>   (pixel-scroll-precision-mode -1)  ; Ensure mouse wheel scroll up and down works
>   (pop-to-buffer (current-buffer)))
> 
> 1. "M-: (scroll-up) RET" (repeatedly)
> 2. C-v (repeatedly)
> 3. <wheel-down> (repeatedly)
> 
> With all three methods, at first Emacs gradually scrolls the image, but
> then when I reach the bottom of the image, the image disappears entirely
> as Emacs scrolls past it all at once.

Why is that a problem?  The default Emacs scrolling commands don't
guarantee smooth constant-rate scrolling, they guarantee only that you
get to see all the portions of the image, without missing any.  So
when you get to the end of the image, there's a heuristic that decides
whether we can scroll past the image, and that is what you see.

I see no bug here.





Last modified: Mon, 25 Mar 2024 16:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.