Subject: Re: bug#35659: 26.1; Weird horizontal scroll behavior with certain settings for `auto-hscroll-mode' and `hscroll-step`.

From: Eli Zaretskii <[email-masked]>
Date: Fri, 10 May 2019 16:02:43 +0300

> Cc: [email-masked]
> From: Clemens Radermacher <[email-masked]>
> Date: Fri, 10 May 2019 14:37:59 +0200
> 
> > Neither auto-hscroll-mode nor the current-line hscrolling
> > feature change that basic behavior.
> 
> When I do the described steps with hscroll-step set to 0 I don't get this
> behavior. Then it is the way I would like it to be (just go to the end of the previous
> line without scrolling it when it doesn't exceeds the window width). 

Then I guess you already have the solution that fits your needs,
right?

> In my opinion the behavior in the gif is a bug,
> the lines which do no exceed the window width should not be scrolled should they?

By default, they are scrolled, exactly as they are when
auto-hscroll-mode is t.  You are saying that the 'current-line' mode
should behave differently because of some different expectations in
that specific case.  That's debatable, but the fact is the code which
implements that mode was never meant to change this basic behavior of
horizontal scrolling.

If someone wants to write code to cater also to the behavior you want
to see, I promise to review it.  But I won't myself work on this, as
this area of the Emacs display is already quite tricky and full of
subtleties.  Sorry.