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

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

bug#19464: 24.4; Customizing either scroll-step or scroll-conservatively


From: Eli Zaretskii
Subject: bug#19464: 24.4; Customizing either scroll-step or scroll-conservatively makes Emacs hang up when calling set-window-vscroll with large values
Date: Mon, 31 May 2021 21:45:49 +0300

> From: Vasilij Schneidermann <v.schneidermann@gmail.com>
> Date: Mon, 31 May 2021 18:41:04 +0200
> Cc: 19464@debbugs.gnu.org
> 
> Yes, I do. My reproducer relies on having a file spanning more than a
> screenful open.
> 
> - Run `emacs -Q`
> - Paste the following code block into the scratch buffer
> - Evaluate with `M-x buffer`
> 
> (find-library "subr")
> (setq scroll-conservatively 10000)
> (set-window-vscroll nil 9000 t)

Emacs doesn't hang, it's just that redisplay becomes extremely
sluggish with these settings after certain commands.  If you turn off
blink-cursor-mode and global-eldoc-mode (which induce additional
redisplay cycles, and thus create an illusion of a hang) before
setting the two variables, you will see that after several dozens of
seconds Emacs finishes redisplay with this huge vscroll and can
perform further commands, albeit with some of them responding slowly.

The problem here is that you on the one hand ask the display engine to
be very accurate when scrolling the window, so that not even a single
text line is scrolled into the view unless it's necessary to show
point; and OTOH you force point to be very far outside the viewport.
Whet the display engine does in response is (slowly and inefficiently)
finding how to deal with this contradiction.

IOW: Emacs gave you a rope and you've succeeded to hang yourself with
it.

If we think that this result is not what should be expected in this
situation, then what should be expected?  Should we somehow detect the
huge vscroll and limit it? or disallow scroll-conservatively in this
case? or something else?

In general, vscroll was introduced to support display of stuff that is
too tall to fit in the window: tall images and very large fonts.
Here, it seems you are trying to use it to force point out of the
viewport, and the question I have is: what for, and what you expect
Emacs to do in this barely supported situation?





reply via email to

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