GNU bug report logs - #69972
29.1; Unexpected behavior when scrolling images

Previous Next

Package: emacs;

Reported by: Joseph Turner <joseph <at> ushin.org>

Date: Sun, 24 Mar 2024 09:13:02 UTC

Severity: normal

Tags: moreinfo

Found in version 29.1

Full log


Message #23 received at 69972 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Joseph Turner <joseph <at> ushin.org>, Po Lu <luangruo <at> yahoo.com>
Cc: 69972 <at> debbugs.gnu.org
Subject: Re: bug#69972: 29.1; Unexpected behavior when scrolling images
Date: Thu, 28 Mar 2024 08:24:20 +0200
> From: Joseph Turner <joseph <at> ushin.org>
> Cc: 69972 <at> debbugs.gnu.org
> Date: Mon, 25 Mar 2024 12:43:39 -0700
> 
> >> 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.
> 
> With pixel-scroll-precision-mode enabled and at least one character after
> the image, I am able to smoothly scroll around the image.

pixel-scroll-precision-mode indeed attempts to make the scrolling much
more smooth than the default scrolling in these cases.

> However, if the window is scrolled to the right, then it is impossible
> to scroll down:
> 
> (with-current-buffer (get-buffer-create "*test-scroll-image*")
>   (erase-buffer)
>   (insert-image (create-image "splash.png" nil nil :scale 10))
>   (insert-char 8203)
>   (goto-char (point-min))
>   (pixel-scroll-precision-mode 1)
>   (pop-to-buffer (current-buffer))
>   (set-window-hscroll (get-buffer-window) 1)) ;; Image scrolled to right
> 
> In this buffer, if I attempt to scroll down with the mouse wheel, I
> immediately get "End of buffer" error and the image does not move.

Then maybe Po Lu (CC'ed) could look into this and see if
pixel-scroll-precision-mode could do better in this case.




This bug report was last modified 110 days ago.

Previous Next


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