unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Vasilij Schneidermann <v.schneidermann@gmail.com>
Cc: larsi@gnus.org, 19464@debbugs.gnu.org
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	[thread overview]
Message-ID: <83o8cq2142.fsf@gnu.org> (raw)
In-Reply-To: <CAPGgwWQPvJEDCf15J_ARBSgc2v6LopMnmdN16T354a6PhFO+fA@mail.gmail.com> (message from Vasilij Schneidermann on Mon, 31 May 2021 18:41:04 +0200)

> 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	other threads:[~2021-05-31 18:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29 16:42 bug#19464: 24.4; Customizing either scroll-step or scroll-conservatively makes Emacs hang up when calling set-window-vscroll with large values Vasilij Schneidermann
2015-01-26 16:56 ` Vasilij Schneidermann
2021-05-28  1:43 ` Lars Ingebrigtsen
2021-05-31 16:41   ` Vasilij Schneidermann
2021-05-31 18:45     ` Eli Zaretskii [this message]
2021-06-01  6:04     ` Lars Ingebrigtsen
2021-06-30 13:20       ` Lars Ingebrigtsen

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=83o8cq2142.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=19464@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=v.schneidermann@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).