From: Eli Zaretskii <eliz@gnu.org>
To: Joseph Turner <joseph@ushin.org>
Cc: 69972@debbugs.gnu.org
Subject: bug#69972: 29.1; Unexpected behavior when scrolling images
Date: Sun, 24 Mar 2024 11:42:56 +0200 [thread overview]
Message-ID: <86h6gwx8wv.fsf@gnu.org> (raw)
In-Reply-To: <87sf0gm1xn.fsf@ushin.org> (bug-gnu-emacs@gnu.org)
> 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@gnu.org>
>
> 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).
next prev parent reply other threads:[~2024-03-24 9:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-24 9:07 bug#69972: 29.1; Unexpected behavior when scrolling images Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-24 9:42 ` Eli Zaretskii [this message]
2024-03-25 1:06 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-25 8:34 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-25 12:23 ` Eli Zaretskii
2024-03-25 19:43 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-28 6:24 ` Eli Zaretskii
2024-03-28 11:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86h6gwx8wv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=69972@debbugs.gnu.org \
--cc=joseph@ushin.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.