all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Rahguzar <rahguzar@zohomail.eu>
Cc: 65214@debbugs.gnu.org
Subject: bug#65214: 29.1; Tall images in 'image-mode' can't be scrolled with 'pixel-scroll-precision-mode' on
Date: Fri, 11 Aug 2023 11:38:28 +0800	[thread overview]
Message-ID: <s0dwmy2w8nf.fsf@yahoo.com> (raw)
In-Reply-To: <87il9mddcx.fsf@zohomail.eu> (rahguzar@zohomail.eu's message of "Thu, 10 Aug 2023 19:05:03 +0200")

Rahguzar <rahguzar@zohomail.eu> writes:

> Dear Emacs developers,
>
> To reproduce starting from 'emacs -Q' visit an image file. Then
> repeatedly use 'i +' till the image is taller than the window. The
> image can be scrolled using mouse wheel. Now do
>
> M-x pixel-scroll-precision-mode
>
> After this attempting to scroll the image will set the vscroll to 0
> and then image can't be scrolled at all.
>
>>From some investigation it seems like this behavior is not specific
> to image-mode. Another way to reproduce the behavior is to evaluate
> the following lisp code,
>
> (let* ((win (display-buffer (get-buffer-create "image-pixel-precision-test")))
>        (height (* (window-text-height win t) 2))
>        (file "path/to/image"))
>   (select-window win)
>   (erase-buffer)
>   (insert-image (create-image file nil nil))
>   (goto-char 1)
>   (pixel-scroll-precision-mode)
>   nil)
>
> This image thus displayed can not be scrolled. However if the code
> above is slightly modified to insert a new line after the image,
> scrolling can be done normally, i.e.
>
> (let* ((win (display-buffer (get-buffer-create "image-pixel-precision-test")))
>        (height (* (window-text-height win t) 2))
>        (file "path/to/image"))
>   (select-window win)
>   (erase-buffer)
>   (insert-image (create-image file nil nil))
>   (insert "\n")
>   (goto-char 1)
>   (pixel-scroll-precision-mode)
>   nil)
>
> produces an image that can be scrolled. Inserting a newline after the
> text covered by the text property holding the image also fixes the
> problem in 'image-mode' but that doesn't seem like the right fix to me.
>
> Rahguzar

This is a known limitation of pixel-scroll-precision-mode: redisplay's
automatic recentering impededs adjustment of the vscroll as the image
moves outside of the window's text area.  Unfortunately, it's not slated
to be fixed any time soon.





  reply	other threads:[~2023-08-11  3:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 17:05 bug#65214: 29.1; Tall images in 'image-mode' can't be scrolled with 'pixel-scroll-precision-mode' on Rahguzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-11  3:38 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-08-11 13:19   ` Rahguzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-11 14:39     ` Rahguzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-12  2:22       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-12  6:50         ` Rahguzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-12  7:25           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-12 10:43             ` Rahguzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-27  7:53             ` Rahguzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-27  8:16               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-27  8:53                 ` Rahguzar 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=s0dwmy2w8nf.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=65214@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=rahguzar@zohomail.eu \
    /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.