From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83o8cq2142.fsf@gnu.org> References: <87cztbzl7u.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35763"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 19464@debbugs.gnu.org To: Vasilij Schneidermann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 31 20:47:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lnmwT-00090R-Fx for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 May 2021 20:47:13 +0200 Original-Received: from localhost ([::1]:38718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnmwR-0004QC-Um for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 May 2021 14:47:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnmwI-0004Q0-FT for bug-gnu-emacs@gnu.org; Mon, 31 May 2021 14:47:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnmwI-0006Ry-7J for bug-gnu-emacs@gnu.org; Mon, 31 May 2021 14:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lnmwI-00024z-5C for bug-gnu-emacs@gnu.org; Mon, 31 May 2021 14:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 May 2021 18:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19464 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 19464-submit@debbugs.gnu.org id=B19464.16224867707934 (code B ref 19464); Mon, 31 May 2021 18:47:02 +0000 Original-Received: (at 19464) by debbugs.gnu.org; 31 May 2021 18:46:10 +0000 Original-Received: from localhost ([127.0.0.1]:34785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnmvR-00023t-P0 for submit@debbugs.gnu.org; Mon, 31 May 2021 14:46:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnmvO-000236-D0 for 19464@debbugs.gnu.org; Mon, 31 May 2021 14:46:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55102) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnmvI-0005o6-Vx; Mon, 31 May 2021 14:46:01 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1846 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnmvI-0000hW-IE; Mon, 31 May 2021 14:46:00 -0400 In-Reply-To: (message from Vasilij Schneidermann on Mon, 31 May 2021 18:41:04 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207720 Archived-At: > From: Vasilij Schneidermann > 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?