GNU bug report logs - #19464
24.4; Customizing either scroll-step or scroll-conservatively makes Emacs hang up when calling set-window-vscroll with large values

Previous Next

Package: emacs;

Reported by: Vasilij Schneidermann <v.schneidermann <at> gmail.com>

Date: Mon, 29 Dec 2014 16:43:02 UTC

Severity: normal

Tags: moreinfo

Found in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 19464 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vasilij Schneidermann <v.schneidermann <at> gmail.com>
Cc: larsi <at> gnus.org, 19464 <at> debbugs.gnu.org
Subject: Re: 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 <at> gmail.com>
> Date: Mon, 31 May 2021 18:41:04 +0200
> Cc: 19464 <at> 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?




This bug report was last modified 4 years and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.