help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set-window-vscroll sometimes doesn't work


From: Eli Zaretskii
Subject: Re: Set-window-vscroll sometimes doesn't work
Date: Tue, 27 Oct 2020 20:32:50 +0200

> From: Yuan Fu <casouri@gmail.com>
> Date: Tue, 27 Oct 2020 14:10:58 -0400
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> 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.

And you can have that, just don't use any functions that set the
window's start point.  E.g., scroll by setting vscroll, and when that
is about to scroll past the last portion of the image, move point to
the next/previous line and set vscroll to a suitable value.  More or
less like image-mode.el does.

Scroll commands via scroll-up/down are for different use cases, so
they don't do what you want.

> How should I move the discussion to emacs-devel? Should I post a new thread 
> and explain the disagreement/confusion?

Start new thread, yes.  What to discuss there is up to you.  I still
have no clear idea what are you looking for.  AFAIU, the problem you
are trying to solve doesn't need any change in how window-start and
vscroll are handled, so I don't understand why you insist on changing
that.

> 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?

You don't need sit-for if you just set vscroll, I think.  The need for
sit-for in your original code was because you set window-start,
something you shouldn't do to solve your problem.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]