From unknown Fri Jun 20 07:26:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#29374 <29374@debbugs.gnu.org> To: bug#29374 <29374@debbugs.gnu.org> Subject: Status: patch for lisp/pixel-scroll Reply-To: bug#29374 <29374@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:26:12 +0000 retitle 29374 patch for lisp/pixel-scroll reassign 29374 emacs submitter 29374 Tak Kunihiro severity 29374 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 20 23:35:32 2017 Received: (at submit) by debbugs.gnu.org; 21 Nov 2017 04:35:32 +0000 Received: from localhost ([127.0.0.1]:49757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eH0HT-0000E7-QT for submit@debbugs.gnu.org; Mon, 20 Nov 2017 23:35:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39085) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eH0HR-0000Du-Lg for submit@debbugs.gnu.org; Mon, 20 Nov 2017 23:35:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eH0HL-0005ql-EC for submit@debbugs.gnu.org; Mon, 20 Nov 2017 23:35:24 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eH0HL-0005qZ-9c for submit@debbugs.gnu.org; Mon, 20 Nov 2017 23:35:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eH0HK-0006NW-25 for bug-gnu-emacs@gnu.org; Mon, 20 Nov 2017 23:35:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eH0HG-0005nM-SZ for bug-gnu-emacs@gnu.org; Mon, 20 Nov 2017 23:35:22 -0500 Received: from mxl065v65.mxlogic.net ([208.81.65.65]:40118 helo=s14p02o142.mxlogic.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eH0HG-0005lA-DP for bug-gnu-emacs@gnu.org; Mon, 20 Nov 2017 23:35:18 -0500 Received: from unknown [42.127.236.175] (EHLO mlsec.cc.okayama-u.ac.jp) by s14p02o142.mxlogic.net(mxl_mta-8.5.0-1920) over TLS secured channel with ESMTP id 00da31a5.0.319739.00-393.662561.s14p02o142.mxlogic.net (envelope-from ); Mon, 20 Nov 2017 21:35:12 -0700 (MST) X-MXL-Hash: 5a13ad0016c5ec08-026afd66ca644b96ec7100ccdd03594d898a4267 Received: from alml002.ouadm.okayama-u.ac.jp (unknown [42.127.236.168]) by mlsec.cc.okayama-u.ac.jp with smtp id 2f11_7833_cc761e6e_3ac4_4f48_b49e_9ba1eadd1f64; Tue, 21 Nov 2017 13:35:08 +0900 Received: from localhost (unknown [172.24.1.79]) by alml002.ouadm.okayama-u.ac.jp (Postfix) with ESMTPSA id 9E44E4C0B01; Tue, 21 Nov 2017 13:35:08 +0900 (JST) Date: Tue, 21 Nov 2017 13:35:07 +0900 (JST) Message-Id: <20171121.133507.1594356869079427384.tkk@misasa.okayama-u.ac.jp> To: bug-gnu-emacs@gnu.org Subject: patch for lisp/pixel-scroll From: Tak Kunihiro X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 4 Rules triggered EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6162=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6162> : inlines <6176> : streams <1770898> : uri <2537621> X-AnalysisOut: [v=2.2 cv=IMhyMknG c=1 sm=1 tr=0 a=8LLPK8U+aGQ6qN8QlyMYtQ==] X-AnalysisOut: [:117 a=8LLPK8U+aGQ6qN8QlyMYtQ==:17 a=kj9zAlcOel0A:10 a=sC3] X-AnalysisOut: [jslCIGhcA:10 a=gxZ1MVgiCXhbhwS93WQA:9 a=CjuIK1q_8ugA:10] X-Spam: [F=0.5100000000; CM=0.500; MH=0.510(2017112018); S=0.200(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [42.127.236.175] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit Cc: tkk@misasa.okayama-u.ac.jp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) I'm sending a patch for lisp/pixel-scroll.el. This patch fixes movement of cursor to stay away from the top of the line and the end of the line on a screen. ChangeLog entry and a patch are attached. * ChangeLog 2017-11-21 Tak Kunihiro Fix cursor movement to stay away from the top of line and the end of line on a screen * lisp/pixel-scroll.el (pixel-scroll-up): Move cursor down regardless eob is shown on the top. (pixel-scroll-down) Move cursor up regardless bob is shown on the top. * Patch diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el old mode 100644 new mode 100755 index 2213a02..556613d --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -110,11 +110,11 @@ This is an alternative of `scroll-up'. Scope moves downward." pixel-resolution-fine-flag (frame-char-height)) (pixel-line-height)))) - (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close - (scroll-up 1) ; relay on robust method - (while (pixel-point-at-top-p amt) ; prevent too late (multi tries) - (vertical-motion 1)) ; move point downward - (pixel-scroll-pixel-up amt))))) ; move scope downward + (while (pixel-point-at-top-p amt) ; prevent too late (multi tries) + (vertical-motion 1)) ; move point downward + (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close + (scroll-up 1) ; relay on robust method + (pixel-scroll-pixel-up amt))))) ; move scope downward (defun pixel-scroll-down (&optional arg) "Scroll text of selected window down ARG lines. @@ -127,11 +127,11 @@ This is and alternative of `scroll-down'. Scope moves upward." pixel-resolution-fine-flag (frame-char-height)) (pixel-line-height -1)))) - (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen - (pixel-eob-at-top-p)) ; for file with a long line - (scroll-down 1) ; relay on robust method - (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries) - (vertical-motion -1)) + (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries) + (vertical-motion -1)) ; move point upward + (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen + (pixel-eob-at-top-p)) ; for file with a long line + (scroll-down 1) ; relay on robust method (pixel-scroll-pixel-down amt))))) (defun pixel-bob-at-top-p (amt) From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 21 10:41:32 2017 Received: (at 29374) by debbugs.gnu.org; 21 Nov 2017 15:41:32 +0000 Received: from localhost ([127.0.0.1]:51253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHAg0-00017C-Fs for submit@debbugs.gnu.org; Tue, 21 Nov 2017 10:41:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHAfy-00016z-Ez for 29374@debbugs.gnu.org; Tue, 21 Nov 2017 10:41:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHAfo-0002Zw-BX for 29374@debbugs.gnu.org; Tue, 21 Nov 2017 10:41:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHAfo-0002Zs-7T; Tue, 21 Nov 2017 10:41:20 -0500 Received: from [176.228.60.248] (port=3702 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eHAfn-0006KD-Mj; Tue, 21 Nov 2017 10:41:20 -0500 Date: Tue, 21 Nov 2017 17:41:15 +0200 Message-Id: <83k1yjd4h0.fsf@gnu.org> From: Eli Zaretskii To: Tak Kunihiro In-reply-to: <20171121.133507.1594356869079427384.tkk@misasa.okayama-u.ac.jp> (message from Tak Kunihiro on Tue, 21 Nov 2017 13:35:07 +0900 (JST)) Subject: Re: bug#29374: patch for lisp/pixel-scroll References: <20171121.133507.1594356869079427384.tkk@misasa.okayama-u.ac.jp> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29374 Cc: 29374@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Tue, 21 Nov 2017 13:35:07 +0900 (JST) > From: Tak Kunihiro > Cc: tkk@misasa.okayama-u.ac.jp > > I'm sending a patch for lisp/pixel-scroll.el. > > This patch fixes movement of cursor to stay away from the top of the > line and the end of the line on a screen. Thanks, but please tell more about the problem, and perhaps show a recipe to reproduce it. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 21 18:08:46 2017 Received: (at 29374) by debbugs.gnu.org; 21 Nov 2017 23:08:46 +0000 Received: from localhost ([127.0.0.1]:51586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHHeo-000130-HE for submit@debbugs.gnu.org; Tue, 21 Nov 2017 18:08:46 -0500 Received: from mxl069v64.mxlogic.net ([208.81.69.64]:26270 helo=s18p02o141.mxlogic.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHHel-00012r-U9 for 29374@debbugs.gnu.org; Tue, 21 Nov 2017 18:08:45 -0500 Received: from unknown [42.127.236.175] (EHLO mlsec.cc.okayama-u.ac.jp) by s18p02o141.mxlogic.net(mxl_mta-8.5.0-1920) over TLS secured channel with ESMTP id ce1b41a5.0.219600.00-365.433465.s18p02o141.mxlogic.net (envelope-from ); Tue, 21 Nov 2017 16:08:36 -0700 (MST) X-MXL-Hash: 5a14b1f4516e7b5d-cf5885fa207cbc097ddfafed3e175149c99a573c Received: from alml002.ouadm.okayama-u.ac.jp (unknown [42.127.236.168]) by mlsec.cc.okayama-u.ac.jp with smtp id 775b_186a_4eab6cd6_3435_47e2_b3b5_c412b5c9ec9d; Wed, 22 Nov 2017 08:08:21 +0900 Received: from localhost (vesta.misasa.okayama-u.ac.jp [150.46.48.154]) by alml002.ouadm.okayama-u.ac.jp (Postfix) with ESMTPSA id 164B24C0976; Wed, 22 Nov 2017 08:08:22 +0900 (JST) Date: Wed, 22 Nov 2017 08:08:17 +0900 (JST) Message-Id: <20171122.080817.1272652886334028034.tkk@misasa.okayama-u.ac.jp> To: eliz@gnu.org Subject: Re: bug#29374: patch for lisp/pixel-scroll From: Tak Kunihiro In-Reply-To: <83k1yjd4h0.fsf@gnu.org> References: <20171121.133507.1594356869079427384.tkk@misasa.okayama-u.ac.jp> <83k1yjd4h0.fsf@gnu.org> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 4 Rules triggered EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6163=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6163> : inlines <6181> : streams <1770969> : uri <2538049> X-AnalysisOut: [v=2.2 cv=a/dAzQaF c=1 sm=1 tr=0 a=8LLPK8U+aGQ6qN8QlyMYtQ==] X-AnalysisOut: [:117 a=8LLPK8U+aGQ6qN8QlyMYtQ==:17 a=kj9zAlcOel0A:10 a=sC3] X-AnalysisOut: [jslCIGhcA:10 a=XT6wmhreCTQi7TgIA68A:9 a=CjuIK1q_8ugA:10] X-Spam: [F=0.5200000000; CM=0.500; MH=0.520(2017112110); S=0.206(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [42.127.236.175] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 29374 Cc: tkk@misasa.okayama-u.ac.jp, 29374@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >> Date: Tue, 21 Nov 2017 13:35:07 +0900 (JST) >> From: Tak Kunihiro >> Cc: tkk@misasa.okayama-u.ac.jp >> >> I'm sending a patch for lisp/pixel-scroll.el. >> >> This patch fixes movement of cursor to stay away from the top of the >> line and the end of the line on a screen. > > Thanks, but please tell more about the problem, and perhaps show a > recipe to reproduce it. First of all, expression of my previous message was not correct. Let me rephrase as below. This patch fixes movement of cursor to stay away from the top and the bottom of a screen. Before fix, sudden scope-jump happened on certain cases. Let's consider a case with cursor is located at the bottom and about to scroll down (move scope up). There is a condition where bob is shown on the top of screen and window-vscroll is non-zero. On this condition, (scroll-up 1) would be called without (vertical-motion -1). As a consequence screen jumps. After the fix, cursor will be moved by vertical-motion before calling scroll-down or pixel-scroll-pixel-down. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 01 03:58:45 2017 Received: (at 29374-done) by debbugs.gnu.org; 1 Dec 2017 08:58:45 +0000 Received: from localhost ([127.0.0.1]:38978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKh9h-0004m0-Af for submit@debbugs.gnu.org; Fri, 01 Dec 2017 03:58:45 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKh9f-0004ln-0V for 29374-done@debbugs.gnu.org; Fri, 01 Dec 2017 03:58:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKh9V-0004aB-7K for 29374-done@debbugs.gnu.org; Fri, 01 Dec 2017 03:58:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKh9V-0004a4-2t; Fri, 01 Dec 2017 03:58:33 -0500 Received: from [176.228.60.248] (port=1840 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eKh9U-0005kR-CX; Fri, 01 Dec 2017 03:58:32 -0500 Date: Fri, 01 Dec 2017 10:58:12 +0200 Message-Id: <83h8ta3jvf.fsf@gnu.org> From: Eli Zaretskii To: Tak Kunihiro In-reply-to: <20171122.080817.1272652886334028034.tkk@misasa.okayama-u.ac.jp> (message from Tak Kunihiro on Wed, 22 Nov 2017 08:08:17 +0900 (JST)) Subject: Re: bug#29374: patch for lisp/pixel-scroll References: <20171121.133507.1594356869079427384.tkk@misasa.okayama-u.ac.jp> <83k1yjd4h0.fsf@gnu.org> <20171122.080817.1272652886334028034.tkk@misasa.okayama-u.ac.jp> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29374-done Cc: 29374-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Wed, 22 Nov 2017 08:08:17 +0900 (JST) > Cc: 29374@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp > From: Tak Kunihiro > > >> Date: Tue, 21 Nov 2017 13:35:07 +0900 (JST) > >> From: Tak Kunihiro > >> Cc: tkk@misasa.okayama-u.ac.jp > >> > >> I'm sending a patch for lisp/pixel-scroll.el. > >> > >> This patch fixes movement of cursor to stay away from the top of the > >> line and the end of the line on a screen. > > > > Thanks, but please tell more about the problem, and perhaps show a > > recipe to reproduce it. > > First of all, expression of my previous message was not correct. > Let me rephrase as below. > > This patch fixes movement of cursor to stay away from the top and > the bottom of a screen. > > Before fix, sudden scope-jump happened on certain cases. Let's > consider a case with cursor is located at the bottom and about to > scroll down (move scope up). > > There is a condition where > bob is shown on the top of screen > and window-vscroll is non-zero. > > On this condition, (scroll-up 1) would be called without > (vertical-motion -1). As a consequence screen jumps. > > After the fix, cursor will be moved by vertical-motion before calling > scroll-down or pixel-scroll-pixel-down. Thanks, I pushed your changes. From unknown Fri Jun 20 07:26:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 29 Dec 2017 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator