GNU bug report logs - #35659
26.1; Weird horizontal scroll behavior with certain settings for `auto-hscroll-mode' and `hscroll-step`.

Previous Next

Package: emacs;

Reported by: clemera <clemera <at> posteo.net>

Date: Thu, 9 May 2019 19:59:02 UTC

Severity: wishlist

Found in version 26.1

Full log


Message #31 received at 35659 <at> debbugs.gnu.org (full text, mbox):

From: Clemens Radermacher <clemens.radermacher <at> posteo.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 35659 <at> debbugs.gnu.org
Subject: Re: bug#35659: 26.1; Weird horizontal scroll behavior with certain
 settings for `auto-hscroll-mode' and `hscroll-step`.
Date: Fri, 10 May 2019 16:25:05 +0200
> I think the fact that it happens for hscroll-step of zero is "by sheer
> luck".  I certainly don't remember explicitly coding that.

Programmers need luck, too ;)

> Maybe someone will find an easy fix, volunteers are welcome.  Emacs
> really shouldn't depend for its display code development on one old
> curmudgeon such as myself...

I had some success with this workaround (ugly but it's enough for my use case):

    (defun my-temporary-change-hscroll (f &rest args)
      (setq hscroll-step 0)
      (apply f args)
      (run-at-time 0.1 nil
                   (lambda ()
                     (setq hscroll-step 1))))

    (advice-add #'previous-line :around 'my-temporary-change-hscroll)
    (advice-add #'next-line :around 'my-temporary-change-hscroll)

I would really like to dig into it but I hardly know any C and I have read several times
that the Emacs code base is reserved for advanced C programmers. Thank you for 
all the work you are doing, Emacs is such a great software!

        Clemens




This bug report was last modified 5 years and 357 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.