[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Set-window-vscroll sometimes doesn't work
From: |
Yuan Fu |
Subject: |
Re: Set-window-vscroll sometimes doesn't work |
Date: |
Tue, 27 Oct 2020 14:10:58 -0400 |
> On Oct 24, 2020, at 3:17 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 23 Oct 2020 16:30:40 -0400
>> Cc: help-gnu-emacs@gnu.org
>>
>> I really need to set them in the same time because when I scroll down, and
>> stopped at a tall image (or tall line), I don’t want to scroll to the top of
>> that image immediately. Instead, I want to scroll just enough to show the
>> bottom of it. This requires setting window-start to that image and set
>> vscroll = image height - line height.
>
> This makes no sense to me, because you want to deliberately deny the
> user from showing the entire screen line or its important parts.
Only when the line is a tall image, which will break smooth scrolling if I try
to show it completely. Instead, I want to reveal the image a bit at a time, so
there is no surprise when scrolling through them. If the user wants to see the
entire line they can press C-l.
> The
> bottom of a large image will generally not show anything important,
> and most of the screen line with the surrounding text could remain
> undisplayed. Why is that a good idea? just because some other editor
> behaves like that?
>
This is not about other editors, really. The main motivation is that with the
current behavior, if I have images and text in the same buffer and I scroll
down/up, the display jumps up and down and I get lost: I kind of lost track of
where I am in the buffer. The desired behavior is, of course, a stable, smooth,
unsurprised scrolling.
Maybe you (and many) scroll by half-screen, but I bet a large chunk of people
using Emacs scrolls by 1 line, and expects a smooth scrolling behavior.
>> So maybe setting both window-start and vscroll should be considered as a
>> valid thing to do?
>
> You can still do that as I've shown before, by inserting (sit-for 0)
> in the middle, right? But I urge you not to do that because it makes
> no sense when text is mixed with images.
>
Will that make sense if the image is on a line by itself (which is often the
case)? Inserting (sit-for 0) gives me flickers, Emacs will show the full image
for like 0.1 second and scroll to the desired vscroll.
> This is a misunderstanding: I have nothing against making image
> scrolling more smooth. The disagreement between us is not about the
> user-facing feature, it is about low-level details of the
> implementation, and how the display engine interprets certain flags.
> (Actually, such a discussion should be held on emacs-devel or the
> issue tracker, not here, precisely because it might confuse people who
> dwell here.)
How should I move the discussion to emacs-devel? Should I post a new thread and
explain the disagreement/confusion?
I think it does make sense for window-start and vscroll to work together, and
the implementation of redisplay seems to suggest that. Could you explain how is
inserting sit-for makes sense but setting both flags at the same time doesn’t?
Yuan
- Re: Set-window-vscroll sometimes doesn't work, (continued)
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/22
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/22
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/22
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/23
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/23
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/23
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/23
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/24
- Re: Set-window-vscroll sometimes doesn't work, Jens C . Jensen, 2020/10/26
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/26
- Re: Set-window-vscroll sometimes doesn't work,
Yuan Fu <=
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/27
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/22