From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3 Date: Sun, 19 Apr 2020 13:17:11 -0400 Message-ID: References: <20200403174757.GA8266@ACM> <834ktwsmfw.fsf@gnu.org> <83imibqsmm.fsf@gnu.org> <478c2aab-a5fc-61c2-02e2-2d9846b95273@yandex.ru> <83v9m9nltx.fsf@gnu.org> <83tv1rn8fx.fsf@gnu.org> <4f8bb277-b376-97bf-8539-799688d8e66d@yandex.ru> <83eesvmj15.fsf@gnu.org> <6eec7f68-770e-b3b1-4627-6222f3ef7216@yandex.ru> <83ftd9kwlu.fsf@gnu.org> <1de9d24f-eeb7-7d0a-3768-4baba4365066@yandex.ru> <83zhbcdmyi.fsf@gnu.org> <61f565cd-4fee-d48c-a9ef-b78419b3d058@yandex.ru> <83wo6ed4kb.fsf@gnu.org> <464b5639-7790-fdbc-b519-22a6b0e8c016@yandex.ru> <83o8rqaucp.fsf@gnu.org> <551c7634-f614-c5a7-c089-33a0dc56574d@yandex.ru> <83imhyaqyw.fsf@gnu.org> <3ddcec07-079f-18e8-81a7-76eaf9a8187a@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="30142"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: rms@gnu.org, emacs-devel@gnu.org, rudalics@gmx.at, rrandresf@gmail.com, acm@muc.de, Eli Zaretskii To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 19 19:18:00 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jQDZw-0007kA-85 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Apr 2020 19:18:00 +0200 Original-Received: from localhost ([::1]:45836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQDZv-0001yb-8J for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Apr 2020 13:17:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53724 helo=eggs1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQDZJ-0001Xx-RT for emacs-devel@gnu.org; Sun, 19 Apr 2020 13:17:22 -0400 Original-Received: from Debian-exim by eggs1p.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQDZI-0004dU-RR for emacs-devel@gnu.org; Sun, 19 Apr 2020 13:17:20 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25546) by eggs1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQDZG-0004aG-ET; Sun, 19 Apr 2020 13:17:18 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DAAC08108A; Sun, 19 Apr 2020 13:17:14 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4A37480D4A; Sun, 19 Apr 2020 13:17:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1587316633; bh=0hvXmoFbKx+/jweiIr7I0mFNgBFnJIpAuiO/dPtvOwY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=lE0cpBAW1/M5/mDlZO3OaFD/8Wr1q1vQ3bjuL60aUCcA/2abFefL62Y7PmKrzxB+7 GNUFajr1+dpjB1dRI2CCaXgLCDFaJ8IHbZ9ktXno/7RE1/WJPOIZJZLYFkFMZ7Punu 6eHkZoDkXa5SbhofyVFQCFOKY6bqujN0+9TK0BS4hr0TOkJ3uV5nzQy1UwGFj9Mca9 ckJYn1q1Y65EmCeghnb3ljBxpyArIQwEsL8Lfm1BNrgSuM7gye4DXsJp5Bwulx05O5 kbChAR1lCgK08AMGZoFIosMNrw/KkRdjSK0leJszKA6+lGJDwiqij6oXz8t8z7Je2T rGHLNUPq7ehzQ== Original-Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DB4441201B0; Sun, 19 Apr 2020 13:17:12 -0400 (EDT) In-Reply-To: <3ddcec07-079f-18e8-81a7-76eaf9a8187a@yandex.ru> (Dmitry Gutov's message of "Sun, 19 Apr 2020 20:09:04 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs1p.gnu.org: Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247321 Archived-At: > The current implementation is too rich for my blood (starting with no > documentation for try_scrolling's arguments). But here's the idea: > > At the beginning of each command, we can save the value of point. If, at the > end, we're still in the same buffer, and the new value of point fails the > scroll-conservatively check, count the lines between the previous value of > point and the new one. If that number is <= scroll-conservatively, then > scroll "conservatively" anyway. Another approach could be: - distinguish the user's setting of scroll-conservatively from the one that applies to the current redisplay. - increase the redisplay's current value of scroll-conservatively each time redisplay is skipped. - reset the redisplay's current value of scroll-conservatively to the variable's value every time redisplay took place. Stefan