From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left Date: Sun, 21 May 2017 22:12:27 +0200 Message-ID: <87inkunf4k.fsf@rosalinde> References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495397599 32098 195.159.176.226 (21 May 2017 20:13:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 May 2017 20:13:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27008@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 21 22:13:15 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCXE1-00089j-RX for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 May 2017 22:13:14 +0200 Original-Received: from localhost ([::1]:39190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCXE5-0007aZ-Rk for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 May 2017 16:13:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCXDv-0007aR-Do for bug-gnu-emacs@gnu.org; Sun, 21 May 2017 16:13:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCXDq-0001IT-Ec for bug-gnu-emacs@gnu.org; Sun, 21 May 2017 16:13:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56950) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCXDq-0001I0-A6 for bug-gnu-emacs@gnu.org; Sun, 21 May 2017 16:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dCXDp-0002kb-U7 for bug-gnu-emacs@gnu.org; Sun, 21 May 2017 16:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 May 2017 20:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27008 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27008-submit@debbugs.gnu.org id=B27008.149539755910542 (code B ref 27008); Sun, 21 May 2017 20:13:01 +0000 Original-Received: (at 27008) by debbugs.gnu.org; 21 May 2017 20:12:39 +0000 Original-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 Original-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 Original-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 In-Reply-To: <83zie6nsip.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 May 2017 18:23:10 +0300") 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+wJGHFrr8JhKLcUKuvKarmEL X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132709 Archived-At: 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