From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Smooth image scrolling
Date: Thu, 08 Oct 2020 11:00:37 +0300 [thread overview]
Message-ID: <837ds187ve.fsf@gnu.org> (raw)
In-Reply-To: <87h7r5s5sp.fsf@web.de> (message from Michael Heerdegen on Thu, 08 Oct 2020 06:25:10 +0200)
> From: Michael Heerdegen <michael_heerdegen@web.de>
> Date: Thu, 08 Oct 2020 06:25:10 +0200
>
> Normally, the calc buffers are only a few lines tall, and one image may
> be quite as large, or even larger. Everything is narrow.
>
> Normal mouse-whell scrolling just jumps past the image, so you have no
> chance to see the second half of it. Even if I scroll in one-line
> steps.
>
> So I experimented with scrolling by changing the window's vscroll (as
> image-mode uses to do). Oh, pixel-scroll-mode doesn't behave much
> nicer, so that didn't help.
>
> But now changing the windows vscroll comes with new problems. When
> increasing the window's vscroll (say, by one) moves the cursor out of
> view, Emacs (redisplay I guess) moves it back into the visible buffer
> part (it doesn't change point), and what I get is actually scrolling
> backwards.
>
> I then tried to adjust point manually, which is not that simple. But
> even then - when I want to get back to standard scrolling (say I have
> now scrolled past the first image), Emacs silently undoes the vscroll
> setting, again scrolling backwards in effect. So I would have to handle
> that effect as well, probably reimplementing more or less the whole
> scrolling algorithms.
>
> Do I miss something, or is this really ... a bit hard to achieve?
It's not easy.
First thing I don't understand is whether you are trying this with the
mouse or with C-n/C-p. The latter should already work reasonably well
for tall images (i.e. images taller than the window), see line-move
and its subroutines line-move-visual and line-move-partial. Maybe the
code there will give you ideas for how to solve your problem?
next prev parent reply other threads:[~2020-10-08 8:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-08 4:25 Smooth image scrolling Michael Heerdegen
2020-10-08 4:35 ` Stefan Monnier
2020-10-08 8:00 ` Eli Zaretskii [this message]
2020-10-09 3:18 ` Michael Heerdegen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=837ds187ve.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).