From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#35659: 26.1; Weird horizontal scroll behavior with certain settings for `auto-hscroll-mode' and `hscroll-step`. Date: Fri, 10 May 2019 10:14:45 +0300 Message-ID: <83r296g4re.fsf@gnu.org> References: <623e30c5-1bef-46c7-06fb-4d087e1a4153@posteo.net> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="268256"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35659@debbugs.gnu.org To: clemera Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 10 09:19:29 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOzoX-0017gi-Gi for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2019 09:19:29 +0200 Original-Received: from localhost ([127.0.0.1]:38188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzoW-00089Q-D9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2019 03:19:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzlD-0005Sg-Kv for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 03:16:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzlC-0001U5-MN for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 03:16:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51676) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOzlC-0001Tp-Iy for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 03:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hOzlC-0007hq-9g for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 03:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 May 2019 07:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35659 X-GNU-PR-Package: emacs Original-Received: via spool by 35659-submit@debbugs.gnu.org id=B35659.155747250329519 (code B ref 35659); Fri, 10 May 2019 07:16:02 +0000 Original-Received: (at 35659) by debbugs.gnu.org; 10 May 2019 07:15:03 +0000 Original-Received: from localhost ([127.0.0.1]:36987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOzkE-0007fh-Fk for submit@debbugs.gnu.org; Fri, 10 May 2019 03:15:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOzkC-0007f5-43; Fri, 10 May 2019 03:15:00 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzk5-0000Vo-Sx; Fri, 10 May 2019 03:14:53 -0400 Original-Received: from [176.228.60.248] (port=2462 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hOzk5-00047s-DH; Fri, 10 May 2019 03:14:53 -0400 In-reply-to: <623e30c5-1bef-46c7-06fb-4d087e1a4153@posteo.net> (message from clemera on Thu, 9 May 2019 21:15:26 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 209.51.188.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:159018 Archived-At: tags 35659 notabug thanks > From: clemera > Date: Thu, 9 May 2019 21:15:26 +0200 > > After starting emacs -Q I set the following settings by evaluating them in *scratch*: > > (setq auto-hscroll-mode 'current-line > hscroll-step 1 > truncate-lines t) > > Now after adding a long line right after the above code block (which exceeds the frame width) > go to the end of the long line. The line scrolls as expected but when you go from there to the lines above, those get > pushed to the left. I have recorded a gif which shows the described behavior: > > https://imgur.com/a/lJYo4Od This is the normal behavior of C-n and C-p (UP and DOWN arrow keys): they try to move into the same column of the next/previous line as the one of the line you started with. The rationale is to allow you to see the same horizontal region in the lines through which you traverse. Neither auto-hscroll-mode nor the current-line hscrolling feature change that basic behavior. If we were to disable this feature, typing C-n followed by C-p would not return you back to the same column; you'd need to manually go to the original column instead. That'd be an annoyance, I think, as it would effectively throw away your hscroll each time you move to another line. So I don't think there's a bug here.