From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57343: hscroll current-line scrolls short lines too far to the left Date: Tue, 23 Aug 2022 16:13:27 +0300 Message-ID: <83czcr85mw.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11411"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57343@debbugs.gnu.org To: Erik van Zwol Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 23 15:14:24 2022 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 1oQTjc-0002mM-Do for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 15:14:24 +0200 Original-Received: from localhost ([::1]:37984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQTjb-000212-E4 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 09:14:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQTjG-0001lM-Ry for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 09:14:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53194) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQTjG-0004E8-K6 for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 09:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQTjG-0002O7-Fl for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 09:14: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: Tue, 23 Aug 2022 13:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57343 X-GNU-PR-Package: emacs Original-Received: via spool by 57343-submit@debbugs.gnu.org id=B57343.16612604099132 (code B ref 57343); Tue, 23 Aug 2022 13:14:02 +0000 Original-Received: (at 57343) by debbugs.gnu.org; 23 Aug 2022 13:13:29 +0000 Original-Received: from localhost ([127.0.0.1]:42943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQTii-0002NE-Qg for submit@debbugs.gnu.org; Tue, 23 Aug 2022 09:13:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQTig-0002Mp-Nl for 57343@debbugs.gnu.org; Tue, 23 Aug 2022 09:13:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQTib-00049E-HL; Tue, 23 Aug 2022 09:13:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=LSZ6Q++HPQ37N2yLrxTtAqi3ihg+WwDsMz7N3RO2yPc=; b=YEVHpbMo8nzo YAeLSkjx5JXL30EuvzNA2n/1Ze7R5ZTO9ESGp7Zx6daVNUD9mwmdeom8ERaK047Txf52q3Q+8oGhL vcqKdiH+lOburXBILJ06K19tKVaf5QhN3yNH1laZqEtfS1kun7Y2A5kcxM9cSS4PwP3R2zrGVjgw0 /NRuc6tUBSUSf7bod4JafZIm3L5fzFWY+cfCM86pJfMJtvZCYgZQ55hoOGUHkV3TOs9gvzhIL6uVH lfjPpyIsXUqPl8M/Yr7+huZjvlaKzpUuE9Zij7QBOIw8afvybFldriza39uWzWffTEFIz+gxiUK/g zEnk8HbFdTRhTgncdmxVqw==; Original-Received: from [87.69.77.57] (port=2274 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQTib-0001h1-0p; Tue, 23 Aug 2022 09:13:21 -0400 In-Reply-To: (message from Erik van Zwol on Sun, 21 Aug 2022 22:03:29 -0600) 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" Xref: news.gmane.io gmane.emacs.bugs:240539 Archived-At: > From: Erik van Zwol > Date: Sun, 21 Aug 2022 22:03:29 -0600 > > starting from 'emacs -Q': > Toggle-truncate-lines (so that long lines are truncated) > Evaluate the following: > (setq auto-hscroll-mode 'current-line) > (setq hscroll-margin 5) > (setq hscroll-step 1) > Insert enough text such that the line starts to hscroll > On the line directly below, insert enough text to fill about half the > width of the frame > Move point to the long line near the end (must be hscrolling the single > line) > Move point down to the next line, it should hscroll even though it does > not need to > See the animated gifs on this post: > https://www.reddit.com/r/emacs/comments/wgef0b/looking_for_better_alternative_to_autohscrollmode/ > > I have attached a patch that I think fixes the issue. Please tell me > how to proceed, and what other information you need. Thanks. I feel there's something else at work here, because if you move the cursor up instead of down (i.e., to the previous instead of the next line), the problem doesn't happen. So I need to look closer at what is going on and why. Stay tuned.