From unknown Fri Aug 15 15:33:37 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#27008 <27008@debbugs.gnu.org> To: bug#27008 <27008@debbugs.gnu.org> Subject: Status: 26.0.50; auto-hscroll-mode and scroll-left Reply-To: bug#27008 <27008@debbugs.gnu.org> Date: Fri, 15 Aug 2025 22:33:37 +0000 retitle 27008 26.0.50; auto-hscroll-mode and scroll-left reassign 27008 emacs submitter 27008 Stephen Berman severity 27008 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Sun May 21 10:10:22 2017 Received: (at submit) by debbugs.gnu.org; 21 May 2017 14:10:22 +0000 Received: from localhost ([127.0.0.1]:59465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCRYs-0000wf-3v for submit@debbugs.gnu.org; Sun, 21 May 2017 10:10:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCRYq-0000wO-Lk for submit@debbugs.gnu.org; Sun, 21 May 2017 10:10:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCRYk-0001nG-LR for submit@debbugs.gnu.org; Sun, 21 May 2017 10:10:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57298) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dCRYk-0001nC-4E for submit@debbugs.gnu.org; Sun, 21 May 2017 10:10:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCRYi-0005SP-TJ for bug-gnu-emacs@gnu.org; Sun, 21 May 2017 10:10:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCRYf-0001lp-NZ for bug-gnu-emacs@gnu.org; Sun, 21 May 2017 10:10:12 -0400 Received: from mout.gmx.net ([212.227.17.21]:57047) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCRYf-0001iD-CO for bug-gnu-emacs@gnu.org; Sun, 21 May 2017 10:10:09 -0400 Received: from rosalinde ([83.135.14.203]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MOCSm-1dHvCL0NBE-005VNx for ; Sun, 21 May 2017 16:10:05 +0200 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 26.0.50; auto-hscroll-mode and scroll-left Date: Sun, 21 May 2017 16:10:04 +0200 Message-ID: <87shjynvwj.fsf@rosalinde> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K0:+J//r0MeNLqiWCV8LXqwlJ2fKwd0/1NYmosAKhcFrjzNBCd0rfk u4CRYxrrt1RfTkTe0yxq8L6IhPcyLKEr2ctxKeoygMDmAGI1DbkfoRm+C4DPcvnmCkMHAba HY3waY1v2MfuulZ+/r68MyovspJZBXvgphFORbpP6KKk4sx/7xIYJ3+P7X4vqOli0QgWatc WgvGzV6zY/wO7rFFV4Pwg== X-UI-Out-Filterresults: notjunk:1;V01:K0:F9RWDwGTpe4=:rkaGACMDiOfQYlG+/kljyw qLxj9jRdEi+t517uOAYS8PrxLPBHwwAh74M2f68vAVSHy4FC90jbeNq05xEF4yhv8eensUxgH Cjvf1cLXQXgVXp8+1u3b/S6b31gcS2LMxEhXXwhXi3PtpG7+KqyOSn75HkDchpC8S5pRggzMM Q94m11rLzKfA+V/rWWYceb5M0/9zbCdlJykenXxsKCHJRzChNzxnIim03no2FacNBFwKWzoE0 wzHATr8CnLjcG4EeQpIWiQXMbpx3oKh2wPXXCEuoEx2YRys0AJp2NMzLybuDb1YX4APqjnQ42 J0fVDGOM30/NAYM8ufr1P+vDl0zxRyJPXZrfZsf9ShO72JAHbGMD/LCy+HJMfG7tgsWjwYNN5 9CZibCQeCggxgM+UKnfQvJDSG9UkyUgqhHg7nWaUBP2LvSPczKwzL8RuAiqEPTw2pXBhR2YWL fVTopDg1Aau1fiMr+SwJWZRrp57+qqHpDJGdDsfMjh3ID8prPw6r3YeZO5vMXq1AH1D+5sEjn BJLXQxd0MQKCynd7PVRLKcnnUrjyQukpHhxwoHIoE1qfUvPBqyBrAOQyVXu1dEm5ysWOf9Lli E6lCw/PgKvOOJax3qNuen5h8NIh9Tq/DVTFNHRExG90QvQeYbshxIsm8hpeXTKUKtNKPAZxqU h/EGP7JqLiA1udX2li/WM3OySlIIp2SEZ8psQpbxA0g4MzVmSvzid9/R6FxbClTrZdSGzQ3gc 8waoiz14CeXpeSAUHvKibKT2vJItWIeZPIwQaxhgfnpbrTyYmFiRg+8xUlw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [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: -3.6 (---) X-Debbugs-Envelope-To: submit 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: -3.6 (---) --=-=-= Content-Type: text/plain When auto-hscroll-mode is set to `current-line' and scroll-left is invoked with arguments ARG > 0 and SET-MINIMUM non-nil, then when the current line is automatically horizontally scrolled, all other lines in the buffer are scrolled back to logical BOL, i.e. SET-MINIMUM is ignored (except on the current line). To reproduce: 0. emacs -Q 1. Set auto-hscroll-mode to `current-line'. 2. Type `C-x C-f /path/to/hscroll-bug RET' (the attached file). 3. Type `M-x toggle-truncate-lines' and `M-: (scroll-left 32 t)'. 4. Type `C-p' repeatedly. => When point is on the third line, and for all subsequent vertical motion, all lines but the current one are displayed starting at BOL instead of column SET-MINIMUM. (I found this bug because I sometimes use scroll-left with non-nil SET-MINIMUM in the Gnus *Summary* buffer to see more of the article Subject lines; the attached file hscroll-bug, used in the above recipe, is taken from such a buffer.) In GNU Emacs 26.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version 3.22.8) of 2017-05-21 built on rosalinde Repository revision: 08212929ba7052883bd506be320dfaaae5b68970 Windowing system distributor 'The X.Org Foundation', version 11.0.11901000 Configured using: 'configure 'CFLAGS=-Og -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=hscroll-bug Content-Transfer-Encoding: base64 ICAgKCAgNTYpIEVsaSBaYXJldHNraWkgICAgICAgIOKUgiBtYXN0ZXIgYzE4OTk4NjogQWRkIGFu IG9wdGlvbmFsIGFyZ3VtZW50cyB0byBzdHJpbmctdHJpbQogICAoICA3NCkgRWxpIFphcmV0c2tp aSAgICAgICAg4pSCIG1hc3RlciBkMzVkYTIxOiBJbXByb3ZlIGRvY3VtZW50YXRpb24gb2YgJ3Nw bGl0LXN0cmluZycKICAgKCAgMTIpIE1pY2hhZWwgQWxiaW51cyAgICAgIOKUgiDilrYgbWFzdGVy IHVwZGF0ZWQgKGQzNWRhMjEgLT4gMWIwZWM5ZikKICAgKCAgMzApIE1pY2hhZWwgQWxiaW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ounces@debbugs.gnu.org Sun May 21 11:23:36 2017 Received: (at 27008) by debbugs.gnu.org; 21 May 2017 15:23:36 +0000 Received: from localhost ([127.0.0.1]:59481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCShj-0002db-UH for submit@debbugs.gnu.org; Sun, 21 May 2017 11:23:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCShi-0002dO-A6 for 27008@debbugs.gnu.org; Sun, 21 May 2017 11:23:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCSha-0004FA-0L for 27008@debbugs.gnu.org; Sun, 21 May 2017 11:23:29 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCShZ-0004F5-TE; Sun, 21 May 2017 11:23:25 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3714 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dCShZ-0007GO-8Q; Sun, 21 May 2017 11:23:25 -0400 Date: Sun, 21 May 2017 18:23:10 +0300 Message-Id: <83zie6nsip.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <87shjynvwj.fsf@rosalinde> (message from Stephen Berman on Sun, 21 May 2017 16:10:04 +0200) Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> 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: 27008 Cc: 27008@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 (-----) > From: Stephen Berman > Date: Sun, 21 May 2017 16:10:04 +0200 > > When auto-hscroll-mode is set to `current-line' and scroll-left is > invoked with arguments ARG > 0 and SET-MINIMUM non-nil, then when the > current line is automatically horizontally scrolled, all other lines in > the buffer are scrolled back to logical BOL, i.e. SET-MINIMUM is ignored > (except on the current line). To reproduce: > > 0. emacs -Q > 1. Set auto-hscroll-mode to `current-line'. > 2. Type `C-x C-f /path/to/hscroll-bug RET' (the attached file). > 3. Type `M-x toggle-truncate-lines' and `M-: (scroll-left 32 t)'. > 4. Type `C-p' repeatedly. > => When point is on the third line, and for all subsequent vertical > motion, all lines but the current one are displayed starting at BOL > instead of column SET-MINIMUM. I don't understand what you expected instead. current-line hscrolling is designed to be disabled when manual scrolling is used, so using scroll-left is incompatible with automatic hscrolling and should have disabled it. If anything, I could understand a complaint that the current line is still hscrolled in this recipe, but otherwise I think your expectations are a tad too much; the effect you describe is more or less what I intended to happen. Technically, the minimum hscroll is implemented by the same code which calculates the window's hscroll value upon redisplay, and in current-line hscrolling that value affects only the current line, the rest of the window is displayed as if the hscroll is zero. From debbugs-submit-bounces@debbugs.gnu.org Sun May 21 16:12:39 2017 Received: (at 27008) by debbugs.gnu.org; 21 May 2017 20:12:39 +0000 Received: from localhost ([127.0.0.1]:59627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCXDT-0002jy-2O for submit@debbugs.gnu.org; Sun, 21 May 2017 16:12:39 -0400 Received: from mout.gmx.net ([212.227.15.15]:51618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCXDQ-0002jl-QD for 27008@debbugs.gnu.org; Sun, 21 May 2017 16:12:37 -0400 Received: from rosalinde ([83.135.14.203]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LikE1-1docmf43J7-00cyBk; Sun, 21 May 2017 22:12:29 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> Date: Sun, 21 May 2017 22:12:27 +0200 In-Reply-To: <83zie6nsip.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 May 2017 18:23:10 +0300") Message-ID: <87inkunf4k.fsf@rosalinde> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:oxHpP/TvusLRoKawAYzjsj0kDk92wzGD8siDePpEXEIDVHR1LKt cJ75vrhjcV4Gydg9+ug6qCtXTOAwTuYgnl9Gl05RfjvjFncFzuxCQZp5kw27j9nfHPeEoiZ K5JdW1Y8FrJOJnUztP7qaVfsHK73DAdkHyg4qMqWehH8ceJHB+AewN5pngMyKceeW/EMDOm RGRp0cYgDcPrKoYoS70GA== X-UI-Out-Filterresults: notjunk:1;V01:K0:NJDZKUIXsaQ=:VKlWMqv0lJIvNPTHwU9Fhy ZrzlNELYXJm1yw85GXOr9awmYq47/qNE040WeaVXBlNHbPUWQUOXvJFMZha1RKOe7L22vZLfa Mla73yTeYMi2NtSXE/Va1bcAz0fsiHSZWCQRES688xzI6GR+wZ49uCqgc41SVEm3+kSvBFtE5 J6OvJnIrChY1CXndUahdaE+BLU0YOZ/H/pd6sgkqN7gjBhsHzqC8ZShzZ5TIlk3sjVm/VXXfn BewEc9q8QrCXCRCvUiVDRuVFIfDc3KFX0zG+5iBjLm7OtWXNk3ZDoHGok4YEL8Yr/ZHN3XVPA dkfOW0i8G2t1EL2Zo8StqCoGKvD/lDDf9jCR1E4YwIGUN+xN63gglAGN22Eu2IOQaTqRzXicQ TltW060sIO8Gg9w13V7lf7RdEV//pTVnMP6G+fzzmLTqfn7Z+u/enVBCOtuzFOeojfWerDk8j 82eaiUzGsm4E4+10m/Qy15J8K6SLjppoObozLjl+vjZ92eFPzaNh7Jh09xzyWHFcJL2l+57yB /15ZVJ/gsvbl3hWQT8jHQmp4SyGRC8IWWdtqWrQg5Vgx0pCIhRIgc/vwRX2twzyt8KoqxJqCw NnEyQj66wbXCXuJ/PZxfA3ew972Jaf1nsXJTs+uKfHlHMqjwC6K7UhcQbKYy1bjhuOsszpW3Q yk77zfWKp4mDLDqrDT4E/UAGEtsrKaaqOs/eNqcWXbQVeSMSUvnGuI5icCZfbJK3zionQs1gX 8yBJIHvr0XJvTDnFDaE7KeE/piup4YjSzjDwfW+/SsZOhcsZ+wJGHFrr8JhKLcUKuvKarmEL6 n2d+QO+ X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 27008 Cc: 27008@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.2 (/) On Sun, 21 May 2017 18:23:10 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Date: Sun, 21 May 2017 16:10:04 +0200 >> >> When auto-hscroll-mode is set to `current-line' and scroll-left is >> invoked with arguments ARG > 0 and SET-MINIMUM non-nil, then when the >> current line is automatically horizontally scrolled, all other lines in >> the buffer are scrolled back to logical BOL, i.e. SET-MINIMUM is ignored >> (except on the current line). To reproduce: >> >> 0. emacs -Q >> 1. Set auto-hscroll-mode to `current-line'. >> 2. Type `C-x C-f /path/to/hscroll-bug RET' (the attached file). >> 3. Type `M-x toggle-truncate-lines' and `M-: (scroll-left 32 t)'. >> 4. Type `C-p' repeatedly. >> => When point is on the third line, and for all subsequent vertical >> motion, all lines but the current one are displayed starting at BOL >> instead of column SET-MINIMUM. > > I don't understand what you expected instead. I expected behavior similar to when auto-hscroll-mode is set to t and I evaluate (scroll-left 32 t): in that case, automatic scrolling still happens on long enough lines, but the minimum hscroll is respected. So with auto-hscroll-mode set to `current-line' I expected to get scrolling of the current line and the rest of the lines would be displayed as if the window's left edge was at column 32. > current-line hscrolling > is designed to be disabled when manual scrolling is used, so using > scroll-left is incompatible with automatic hscrolling and should have > disabled it. Why should current-line hscrolling be different from window hscrolling in this respect? In other words, since automatic window hscrolling still works when scroll-left is executed, why shouldn't current-line hscrolling also work then? > If anything, I could understand a complaint that the > current line is still hscrolled in this recipe, but otherwise I think > your expectations are a tad too much; the effect you describe is more > or less what I intended to happen. There is an oddity that I doubt you intended: when point is at the left window edge of the current line (e.g. via C-a), column-number-mode shows it at column 0, though this is not displayed, and indeed typing C-n does not advance point until it reaches column 33 (SET-MINIMUM + 1); nevertheless, all the other lines are displayed from their respective BOL, i.e. column 0 (as you point out below). When scrolling vertically through the buffer with C-p and C-n or the arrow keys, this looks very strange. > Technically, the minimum hscroll is implemented by the same code which > calculates the window's hscroll value upon redisplay, and in > current-line hscrolling that value affects only the current line, the > rest of the window is displayed as if the hscroll is zero. Is this necessary? Why can't the other lines be displayed with hscroll set to w->min_hscroll, as they are with auto-hscroll-mode set to t? Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 10:56:12 2017 Received: (at 27008) by debbugs.gnu.org; 30 May 2017 14:56:12 +0000 Received: from localhost ([127.0.0.1]:45391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFiZA-0006b9-54 for submit@debbugs.gnu.org; Tue, 30 May 2017 10:56:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFiZ7-0006aw-W9 for 27008@debbugs.gnu.org; Tue, 30 May 2017 10:56:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFiYz-0000xB-Qn for 27008@debbugs.gnu.org; Tue, 30 May 2017 10:56:04 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFiYz-0000x4-NS; Tue, 30 May 2017 10:56:01 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2532 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFiYy-0006ay-TZ; Tue, 30 May 2017 10:56:01 -0400 Date: Tue, 30 May 2017 17:56:07 +0300 Message-Id: <83efv6e6m0.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <87inkunf4k.fsf@rosalinde> (message from Stephen Berman on Sun, 21 May 2017 22:12:27 +0200) Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> 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: 27008 Cc: 27008@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 (-----) > From: Stephen Berman > Cc: 27008@debbugs.gnu.org > Date: Sun, 21 May 2017 22:12:27 +0200 > > Why can't the other lines be displayed with hscroll set to > w->min_hscroll, as they are with auto-hscroll-mode set to t? Thanks, I've tried to implement this idea in the attached. I won't have enough time to test it, though, so please run with this applied for a few days and see if there are any adverse effects. If not, I will push this. diff --git a/src/xdisp.c b/src/xdisp.c index ddb26b8..898eb6b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2890,8 +2890,19 @@ init_iterator (struct it *it, struct window *w, } else { + /* When hscrolling only the current line, don't apply the + hscroll here, it will be applied by display_line when it gets + to laying out the line showing point. However, if the + window's min_hscroll is positive, the user specified a lower + bound for automatic hscrolling, so they expect the + non-current lines to obey that hscroll amount. */ if (hscrolling_current_line_p (w)) - it->first_visible_x = 0; + { + if (w->min_hscroll > 0) + it->first_visible_x = w->min_hscroll; + else + it->first_visible_x = 0; + } else it->first_visible_x = window_hscroll_limited (w, it->f) * FRAME_COLUMN_WIDTH (it->f); From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 12:57:13 2017 Received: (at 27008) by debbugs.gnu.org; 30 May 2017 16:57:13 +0000 Received: from localhost ([127.0.0.1]:45557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFkSG-0006TX-Sy for submit@debbugs.gnu.org; Tue, 30 May 2017 12:57:13 -0400 Received: from mout.gmx.net ([212.227.17.21]:64931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFkSE-0006TJ-N7 for 27008@debbugs.gnu.org; Tue, 30 May 2017 12:57:11 -0400 Received: from rosalinde ([83.135.25.138]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MC7em-1d6ulS2buC-008qtp; Tue, 30 May 2017 18:57:02 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> <83efv6e6m0.fsf@gnu.org> Date: Tue, 30 May 2017 18:57:01 +0200 In-Reply-To: <83efv6e6m0.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 30 May 2017 17:56:07 +0300") Message-ID: <87d1aq9tb6.fsf@rosalinde> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:CZOKgT9heda/cD403qmGwicIRNFwHU6NkNErULOHM1mRUDGVKOi DBfoe4FXtx0e4Zt3hZYDqq95s8T1SY5Yhn6hHOaA2VbLGT7R3h35rFEbl0Mt15rjt/MoA9s zTzLUO0PVftfQ9f4vnX6vCKQHLUVdYlMmDBVt8QPi2ieVYzYtHLsioWnvOSZKbUcbgNmeUz mtPC4bRELA/pHh4BOHwwQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:b68435KCcZ0=:CaLGOKYXY3jc80aWIxe+PZ ajzzZU8QwHmcf2Yq6h8pEagJjTgnULTdwNalUwVIlwVtVSCipAuqzgizJS0NzDTnVDSQ/6cuX 8HDpIuYxijVE6pzPxbxW45vye6D6WMDu6kc0BW5IPFlhYZXU6UHmHLyTz93ChA6kbnt9KiEqs z20kVlu+qUXSzufhQVf3jo0Z/MEaBuB+0nalGyJ++T12fj/NXmMquqtvdog0UVSmUiIaMcE/L 1ReG8nUtS9JkhvhXQdiwyInRO0kuwc2o86uWHPd0tO0WrL3qXizHK4g2qlDIEmKDfbNdaXHbG e61Y5aUJrtnueHdVjUlR9K5zPMx+abIUWYkJ7V7rCBKBtSIYDjUhzf73Ypc/7T76vbMZGYukj fAEUnLLtkBypg12BSU4RuTMJ2FJ/zjeI5JrFjuwiCG8N9z1xOWRaVFSkd3jHbiQ/KNEIvlTCI aXfbNJa0cQLT6lwJiS6JSaFOwDTRObvXKCtdqnE0VrDGdm6expjANm+PbUUN7K1XC+DZldlHp rU4fblRNBCm19VloEUUrSn/8igyQ4y4I/fHtXf/rq4L66FvZbb3SuZ3Bskwv6j7e7/9Y5ft3Z K0g6RqAEjXz6UCOaMIo89HNrPfD4HX41uot00M5lcyMfqebSaliyRoDcT8G5WjozAu58/4ENs 4/UcOlATx19F9C6VlNPVrdJoqLbWufRqw5oD75wo2CyTga9IioFfIS86f916vU209IQGQpYqs y+wgpgRaw48U3VbUpBQQpF3rwWuicyGG7JBlObjWUryxlNSINwpAaCCcjeS1J6TOWVVXp/s1L woINRfv X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 27008 Cc: 27008@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.2 (/) On Tue, 30 May 2017 17:56:07 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: 27008@debbugs.gnu.org >> Date: Sun, 21 May 2017 22:12:27 +0200 >> >> Why can't the other lines be displayed with hscroll set to >> w->min_hscroll, as they are with auto-hscroll-mode set to t? > > Thanks, I've tried to implement this idea in the attached. I won't > have enough time to test it, though, so please run with this applied > for a few days and see if there are any adverse effects. If not, I > will push this. Thanks very much for pursuing this. I updated my master branch, applied your patch and rebuilt, but when I executed the recipe of my OP, I saw the same effect with the patch as without it: only the current line respects w->min_hscroll, the other are displayed from BOL. I'd be happy to try and help diagnose this further, if you can advise me what to do. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 13:18:33 2017 Received: (at 27008) by debbugs.gnu.org; 30 May 2017 17:18:33 +0000 Received: from localhost ([127.0.0.1]:45574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFkmv-0006xL-JY for submit@debbugs.gnu.org; Tue, 30 May 2017 13:18:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFkmt-0006x8-NM for 27008@debbugs.gnu.org; Tue, 30 May 2017 13:18:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFkmj-0006BT-Gs for 27008@debbugs.gnu.org; Tue, 30 May 2017 13:18:26 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFkmj-0006BK-D9; Tue, 30 May 2017 13:18:21 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3372 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFkmh-0000DW-Er; Tue, 30 May 2017 13:18:20 -0400 Date: Tue, 30 May 2017 20:18:27 +0300 Message-Id: <83bmqae00s.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <87d1aq9tb6.fsf@rosalinde> (message from Stephen Berman on Tue, 30 May 2017 18:57:01 +0200) Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> <83efv6e6m0.fsf@gnu.org> <87d1aq9tb6.fsf@rosalinde> 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: 27008 Cc: 27008@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 (-----) > From: Stephen Berman > Cc: 27008@debbugs.gnu.org > Date: Tue, 30 May 2017 18:57:01 +0200 > > Thanks very much for pursuing this. I updated my master branch, applied > your patch and rebuilt, but when I executed the recipe of my OP, I saw > the same effect with the patch as without it: only the current line > respects w->min_hscroll, the other are displayed from BOL. I'd be happy > to try and help diagnose this further, if you can advise me what to do. I don't have any advice, because your recipe worked for me after the changes. I'm confused now. From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 13:31:42 2017 Received: (at 27008) by debbugs.gnu.org; 30 May 2017 17:31:42 +0000 Received: from localhost ([127.0.0.1]:45639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFkzd-0007Iq-TI for submit@debbugs.gnu.org; Tue, 30 May 2017 13:31:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFkzc-0007Id-Qy for 27008@debbugs.gnu.org; Tue, 30 May 2017 13:31:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFkzT-000160-Hp for 27008@debbugs.gnu.org; Tue, 30 May 2017 13:31:35 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFkzT-00015t-FJ; Tue, 30 May 2017 13:31:31 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3433 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFkzS-0007g2-Pv; Tue, 30 May 2017 13:31:31 -0400 Date: Tue, 30 May 2017 20:31:38 +0300 Message-Id: <83a85udzet.fsf@gnu.org> From: Eli Zaretskii To: stephen.berman@gmx.net In-reply-to: <83bmqae00s.fsf@gnu.org> (message from Eli Zaretskii on Tue, 30 May 2017 20:18:27 +0300) Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> <83efv6e6m0.fsf@gnu.org> <87d1aq9tb6.fsf@rosalinde> <83bmqae00s.fsf@gnu.org> 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: 27008 Cc: 27008@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, 30 May 2017 20:18:27 +0300 > From: Eli Zaretskii > Cc: 27008@debbugs.gnu.org > > > From: Stephen Berman > > Cc: 27008@debbugs.gnu.org > > Date: Tue, 30 May 2017 18:57:01 +0200 > > > > Thanks very much for pursuing this. I updated my master branch, applied > > your patch and rebuilt, but when I executed the recipe of my OP, I saw > > the same effect with the patch as without it: only the current line > > respects w->min_hscroll, the other are displayed from BOL. I'd be happy > > to try and help diagnose this further, if you can advise me what to do. > > I don't have any advice, because your recipe worked for me after the > changes. I'm confused now. Ah, I see: I sent the wrong patch. Here's the right one: diff --git a/src/xdisp.c b/src/xdisp.c index ddb26b8..3ccd035 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2890,8 +2890,19 @@ init_iterator (struct it *it, struct window *w, } else { + /* When hscrolling only the current line, don't apply the + hscroll here, it will be applied by display_line when it gets + to laying out the line showing point. However, if the + window's min_hscroll is positive, the user specified a lower + bound for automatic hscrolling, so they expect the + non-current lines to obey that hscroll amount. */ if (hscrolling_current_line_p (w)) - it->first_visible_x = 0; + { + if (w->min_hscroll > 0) + it->first_visible_x = w->min_hscroll * FRAME_COLUMN_WIDTH (it->f); + else + it->first_visible_x = 0; + } else it->first_visible_x = window_hscroll_limited (w, it->f) * FRAME_COLUMN_WIDTH (it->f); From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 15:45:57 2017 Received: (at 27008) by debbugs.gnu.org; 30 May 2017 19:45:57 +0000 Received: from localhost ([127.0.0.1]:45700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFn5Z-0003hY-8A for submit@debbugs.gnu.org; Tue, 30 May 2017 15:45:57 -0400 Received: from mout.gmx.net ([212.227.17.22]:62568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFn5X-0003hL-OH for 27008@debbugs.gnu.org; Tue, 30 May 2017 15:45:56 -0400 Received: from rosalinde ([83.135.25.138]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MXqV1-1dS9Gd0tN9-00Wqjf; Tue, 30 May 2017 21:45:48 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> <83efv6e6m0.fsf@gnu.org> <87d1aq9tb6.fsf@rosalinde> <83bmqae00s.fsf@gnu.org> <83a85udzet.fsf@gnu.org> Date: Tue, 30 May 2017 21:45:47 +0200 In-Reply-To: <83a85udzet.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 30 May 2017 20:31:38 +0300") Message-ID: <878tle9lhw.fsf@rosalinde> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1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FIW8fKALA3IOiVuk4nKrGMoQZnVdRf9Y2A5prqoL79YAulFg SCq8sMr X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 27008 Cc: 27008@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: -3.0 (---) On Tue, 30 May 2017 20:31:38 +0300 Eli Zaretskii wrote: >> Date: Tue, 30 May 2017 20:18:27 +0300 >> From: Eli Zaretskii >> Cc: 27008@debbugs.gnu.org >> >> > From: Stephen Berman >> > Cc: 27008@debbugs.gnu.org >> > Date: Tue, 30 May 2017 18:57:01 +0200 >> > >> > Thanks very much for pursuing this. I updated my master branch, applied >> > your patch and rebuilt, but when I executed the recipe of my OP, I saw >> > the same effect with the patch as without it: only the current line >> > respects w->min_hscroll, the other are displayed from BOL. I'd be happy >> > to try and help diagnose this further, if you can advise me what to do. >> >> I don't have any advice, because your recipe worked for me after the >> changes. I'm confused now. > > Ah, I see: I sent the wrong patch. Here's the right one: Thanks. Yes, with this patch the non-current lines are displayed from w->min_hscroll. However, there's a new problem: now when points moves to a line, that line automatically scrolls further by w->min_hscroll. So when I do `(scroll-left 32 t)' and then move point to another line, that line scrolls further left so that its column 64 is on the left edge of the window (the other lines remain displayed starting at column 32). When point moves to the next line, that one scrolls further to column 64 and the previous one goes back to being displayed from column 32. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Wed May 31 03:14:44 2017 Received: (at 27008) by debbugs.gnu.org; 31 May 2017 07:14:44 +0000 Received: from localhost ([127.0.0.1]:46118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFxq8-0001j7-6Z for submit@debbugs.gnu.org; Wed, 31 May 2017 03:14:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFxq6-0001im-MM for 27008@debbugs.gnu.org; Wed, 31 May 2017 03:14:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFxpx-0006GO-88 for 27008@debbugs.gnu.org; Wed, 31 May 2017 03:14:37 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFxpx-0006GK-4f; Wed, 31 May 2017 03:14:33 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3827 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFxpw-0002IX-EZ; Wed, 31 May 2017 03:14:32 -0400 Date: Wed, 31 May 2017 10:14:41 +0300 Message-Id: <834lw1ebvi.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <878tle9lhw.fsf@rosalinde> (message from Stephen Berman on Tue, 30 May 2017 21:45:47 +0200) Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> <83efv6e6m0.fsf@gnu.org> <87d1aq9tb6.fsf@rosalinde> <83bmqae00s.fsf@gnu.org> <83a85udzet.fsf@gnu.org> <878tle9lhw.fsf@rosalinde> 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: 27008 Cc: 27008@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 (-----) > From: Stephen Berman > Cc: 27008@debbugs.gnu.org > Date: Tue, 30 May 2017 21:45:47 +0200 > > Thanks. Yes, with this patch the non-current lines are displayed from > w->min_hscroll. However, there's a new problem: now when points moves > to a line, that line automatically scrolls further by w->min_hscroll. > So when I do `(scroll-left 32 t)' and then move point to another line, > that line scrolls further left so that its column 64 is on the left edge > of the window (the other lines remain displayed starting at column 32). > When point moves to the next line, that one scrolls further to column 64 > and the previous one goes back to being displayed from column 32. Does the below (to be applied on top of current master, i.e. first revert the previous patch) fix this? diff --git a/src/xdisp.c b/src/xdisp.c index c03689b..c96ffce 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2890,8 +2890,19 @@ init_iterator (struct it *it, struct window *w, } else { + /* When hscrolling only the current line, don't apply the + hscroll here, it will be applied by display_line when it gets + to laying out the line showing point. However, if the + window's min_hscroll is positive, the user specified a lower + bound for automatic hscrolling, so they expect the + non-current lines to obey that hscroll amount. */ if (hscrolling_current_line_p (w)) - it->first_visible_x = 0; + { + if (w->min_hscroll > 0) + it->first_visible_x = w->min_hscroll * FRAME_COLUMN_WIDTH (it->f); + else + it->first_visible_x = 0; + } else it->first_visible_x = window_hscroll_limited (w, it->f) * FRAME_COLUMN_WIDTH (it->f); @@ -13099,7 +13110,9 @@ hscroll_window_tree (Lisp_Object window) that doesn't need to be hscrolled. If we omit this condition, the line from which we move will remain hscrolled. */ - || (hscl && w->hscroll && !cursor_row->truncated_on_left_p))) + || (hscl + && w->hscroll != w->min_hscroll + && !cursor_row->truncated_on_left_p))) { struct it it; ptrdiff_t hscroll; @@ -20710,7 +20723,9 @@ display_line (struct it *it, int cursor_vpos) /* If we are going to display the cursor's line, account for the hscroll of that line. */ if (hscroll_this_line) - x_incr = window_hscroll_limited (it->w, it->f) * FRAME_COLUMN_WIDTH (it->f); + x_incr = + (window_hscroll_limited (it->w, it->f) - it->w->min_hscroll) + * FRAME_COLUMN_WIDTH (it->f); /* Move over display elements that are not visible because we are hscrolled. This may stop at an x-position < first_visible_x From debbugs-submit-bounces@debbugs.gnu.org Wed May 31 10:18:36 2017 Received: (at 27008) by debbugs.gnu.org; 31 May 2017 14:18:36 +0000 Received: from localhost ([127.0.0.1]:47521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dG4SK-0002Eq-8m for submit@debbugs.gnu.org; Wed, 31 May 2017 10:18:36 -0400 Received: from mout.gmx.net ([212.227.15.15]:59816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dG4SI-0002Ed-3j for 27008@debbugs.gnu.org; Wed, 31 May 2017 10:18:34 -0400 Received: from rosalinde ([83.135.14.77]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MIu7d-1dE9iE1YV7-002WCS; Wed, 31 May 2017 16:18:27 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> <83efv6e6m0.fsf@gnu.org> <87d1aq9tb6.fsf@rosalinde> <83bmqae00s.fsf@gnu.org> <83a85udzet.fsf@gnu.org> <878tle9lhw.fsf@rosalinde> <834lw1ebvi.fsf@gnu.org> Date: Wed, 31 May 2017 16:18:26 +0200 In-Reply-To: <834lw1ebvi.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 31 May 2017 10:14:41 +0300") Message-ID: <87efv52jpp.fsf@rosalinde> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:hiSxWKnYvFdc6Wu6YmD07J75Cl/H6/67WUv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.0 (---) X-Debbugs-Envelope-To: 27008 Cc: 27008@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: -3.0 (---) On Wed, 31 May 2017 10:14:41 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: 27008@debbugs.gnu.org >> Date: Tue, 30 May 2017 21:45:47 +0200 >> >> Thanks. Yes, with this patch the non-current lines are displayed from >> w->min_hscroll. However, there's a new problem: now when points moves >> to a line, that line automatically scrolls further by w->min_hscroll. >> So when I do `(scroll-left 32 t)' and then move point to another line, >> that line scrolls further left so that its column 64 is on the left edge >> of the window (the other lines remain displayed starting at column 32). >> When point moves to the next line, that one scrolls further to column 64 >> and the previous one goes back to being displayed from column 32. > > Does the below (to be applied on top of current master, i.e. first > revert the previous patch) fix this? Yes, the display and the horizontal scrolling is now exactly as I hoped it would be; many thanks! There is one minor issue: with auto-hscroll-mode set to `current-line' and (scroll-left 32 t), when I scroll vertically by holding down or C-n or or C-p, the motion is less smooth than usual. With the same auto-hscroll-mode setting but no scroll-left, vertical scrolling is smoother, but still not as smooth as with auto-hscroll-mode set to t or nil (with either of these settings, vertical scrolling seems slightly less smooth with (scroll-left 32 t) than with no scroll-left, though the difference is less noticeable than with auto-hscroll-mode set to current-line). But I don't think this is a serious annoyance, so unless you see an easy fix for it, I think you should commit the patch as is to master. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Wed May 31 10:39:12 2017 Received: (at 27008) by debbugs.gnu.org; 31 May 2017 14:39:12 +0000 Received: from localhost ([127.0.0.1]:47530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dG4mG-0002hm-9u for submit@debbugs.gnu.org; Wed, 31 May 2017 10:39:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dG4mD-0002hY-PG for 27008@debbugs.gnu.org; Wed, 31 May 2017 10:39:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dG4m3-0002w8-Nn for 27008@debbugs.gnu.org; Wed, 31 May 2017 10:39:04 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG4m3-0002w3-KZ; Wed, 31 May 2017 10:38:59 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4606 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dG4m2-0001Zf-Tr; Wed, 31 May 2017 10:38:59 -0400 Date: Wed, 31 May 2017 17:39:08 +0300 Message-Id: <83vaohccqb.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <87efv52jpp.fsf@rosalinde> (message from Stephen Berman on Wed, 31 May 2017 16:18:26 +0200) Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> <83efv6e6m0.fsf@gnu.org> <87d1aq9tb6.fsf@rosalinde> <83bmqae00s.fsf@gnu.org> <83a85udzet.fsf@gnu.org> <878tle9lhw.fsf@rosalinde> <834lw1ebvi.fsf@gnu.org> <87efv52jpp.fsf@rosalinde> 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: 27008 Cc: 27008@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 (-----) > From: Stephen Berman > Cc: 27008@debbugs.gnu.org > Date: Wed, 31 May 2017 16:18:26 +0200 > > There is one minor issue: with auto-hscroll-mode set to `current-line' > and (scroll-left 32 t), when I scroll vertically by holding down > or C-n or or C-p, the motion is less smooth than usual. With the > same auto-hscroll-mode setting but no scroll-left, vertical scrolling is > smoother, but still not as smooth as with auto-hscroll-mode set to t or > nil (with either of these settings, vertical scrolling seems slightly > less smooth with (scroll-left 32 t) than with no scroll-left, though the > difference is less noticeable than with auto-hscroll-mode set to > current-line). The display engine is working harder when this mode is on, and some optimizations are disabled. I didn't see a way of implementing this that would avoid more expensive redisplay. Sorry. > But I don't think this is a serious annoyance, so unless you see an > easy fix for it, I think you should commit the patch as is to > master. OK, thanks, will do. From debbugs-submit-bounces@debbugs.gnu.org Wed May 31 12:04:12 2017 Received: (at 27008-done) by debbugs.gnu.org; 31 May 2017 16:04:12 +0000 Received: from localhost ([127.0.0.1]:47677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dG66W-0006ia-6q for submit@debbugs.gnu.org; Wed, 31 May 2017 12:04:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dG66U-0006iM-51 for 27008-done@debbugs.gnu.org; Wed, 31 May 2017 12:04:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dG66L-0002uB-Gz for 27008-done@debbugs.gnu.org; Wed, 31 May 2017 12:04:05 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG66L-0002ts-Eg; Wed, 31 May 2017 12:04:01 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4697 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dG66K-0001ik-RJ; Wed, 31 May 2017 12:04:01 -0400 Date: Wed, 31 May 2017 19:04:10 +0300 Message-Id: <83shjlc8sl.fsf@gnu.org> From: Eli Zaretskii To: stephen.berman@gmx.net In-reply-to: <83vaohccqb.fsf@gnu.org> (message from Eli Zaretskii on Wed, 31 May 2017 17:39:08 +0300) Subject: Re: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> <83efv6e6m0.fsf@gnu.org> <87d1aq9tb6.fsf@rosalinde> <83bmqae00s.fsf@gnu.org> <83a85udzet.fsf@gnu.org> <878tle9lhw.fsf@rosalinde> <834lw1ebvi.fsf@gnu.org> <87efv52jpp.fsf@rosalinde> <83vaohccqb.fsf@gnu.org> 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: 27008-done Cc: 27008-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, 31 May 2017 17:39:08 +0300 > From: Eli Zaretskii > Cc: 27008@debbugs.gnu.org > > > But I don't think this is a serious annoyance, so unless you see an > > easy fix for it, I think you should commit the patch as is to > > master. > > OK, thanks, will do. Done. From unknown Fri Aug 15 15:33:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Jun 2017 11:24:04 +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