From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66769: 30.0.50; pixel-scroll-precision-mode and scroll-margin regression Date: Thu, 02 Nov 2023 14:16:58 +0800 Message-ID: <8734xowug5.fsf@yahoo.com> References: <877cn7xzg0.fsf@yahoo.com> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39893"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66769@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 02 07:17:50 2023 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 1qyR1a-000AHk-HY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Nov 2023 07:17:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyR1U-0006sp-Dz; Thu, 02 Nov 2023 02:17:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyR1F-0006ju-CS for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 02:17:34 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyR1C-0004Qu-Up for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 02:17:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyR1l-0003oD-ML for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 02:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Nov 2023 06:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66769 X-GNU-PR-Package: emacs Original-Received: via spool by 66769-submit@debbugs.gnu.org id=B66769.169890587114624 (code B ref 66769); Thu, 02 Nov 2023 06:18:01 +0000 Original-Received: (at 66769) by debbugs.gnu.org; 2 Nov 2023 06:17:51 +0000 Original-Received: from localhost ([127.0.0.1]:53727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyR1b-0003no-6N for submit@debbugs.gnu.org; Thu, 02 Nov 2023 02:17:51 -0400 Original-Received: from sonic301-30.consmr.mail.ne1.yahoo.com ([66.163.184.199]:46400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyR1Y-0003nW-9Y for 66769@debbugs.gnu.org; Thu, 02 Nov 2023 02:17:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1698905826; bh=x5PRkxvjlg9Aqp0m0UCPUEDvoJjjVxrb3SxhNluP0kQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=kZiQatey0PLZtUChHsoaUiBtD2GBAxaOy9n/k06Uq28fdVvHLgQIBoiOlPoEU+4xqqm2o6tLZIC2ujCjg8jaVeN6DWNChYv4a9adWCwX3NdHYHN6fvAq3W/F396hQPEAjNniO0V42vGp5TmhOu5lL01vC5PuXfFS1J0PlYRKeymnaqB+Eohao04oC9u/rVOAgnzlQrr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H.xPJmG0G8na.3lwFtMEOPRSct qZX42.BWoN74u8g5HCn8AVuQRNxSwO4EOlPczDbIFkYuunqgttfvxfP2MeWkIfQJvt6fhSz6WX.2 fPaDRb36NQvXZEqO0yxcHIss18tEiqsfz4sSkCQF3dm61_RuiyeoViEercpPSvntxSZLX4UR2Y82 VKH4kKGgmFPDbIa_Iu4xj.QukakTmyEQdWJ.GrtiFREf4r81AXnSLH7oK1p.eALOHLdle4OqYqdh eIcSs_UcSjV.arAid1vKreNYcGqDp9OLrhHL3h0WkghJTAtY1ncYOhxw36pehREKxS3ANnUMT9BB hBOlpn51GnIpEAQE5mDf3mAK.Qudx3YpeyvidIoKu7uVXhZu7ZOMoPrkdD7ELvgSO.M5Uzye4yQE ttM0dLMNUC14F1hmH5sqgJrTFgwqv55S4pEykOD2j_ X-Sonic-MF: X-Sonic-ID: 6641b0d9-d921-4e73-8ece-5fbefe21f16c Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Thu, 2 Nov 2023 06:17:06 +0000 Original-Received: by hermes--production-sg3-8696d769c6-z26jv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5ba4ec4d7d568842ba60b94828143f8d; Thu, 02 Nov 2023 06:17:03 +0000 (UTC) In-Reply-To: (Aaron Jensen's message of "Wed, 1 Nov 2023 22:49:40 -0700") X-Mailer: WebService/1.1.21890 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273634 Archived-At: Aaron Jensen writes: > It looks like the current code uses posn-at-point already, yes? What > is it that would make it too slow to use it again for the point? posn-at-point is presently not used by p-s-p-m. > I'm trying to understand the code and making some headway, but it's > still not totally clear what's happening and why. It does seem that if > you force a redisplay after the set-window-vscroll, the window-start > will move in the case that it butts up against the scroll margin. Yes, because redisplay is the process responsible for enforcing the scroll margin in the process of maintaining point within the window. > Is there a fast way to compute the position that is scroll-margin > lines away from the window start and then compare the point to that? > Or is the bigger problem when scrolling up? The problem is two-fold: a position must be calculated that is scroll-margin rows from the window start or end, but that position must be replaced by the position of the row farthest from the window boundary opposite the direction being scrolled in if there are fewer than scroll-margin rows displayed in the window _after_ the scroll completes.