all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#69972: 29.1; Unexpected behavior when scrolling images
@ 2024-03-24  9:07 Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-03-24  9:42 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-03-24  9:07 UTC (permalink / raw)
  To: 69972

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-28 11:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.