Subject: bug#43835: 28.0.50; auto-hscroll-mode/current-line + show-paren-mode + gnus-summary-mode = bug

From: Stephen Berman <[email-masked]>
Date: Thu, 08 Oct 2020 12:18:55 +0200

On Thu, 08 Oct 2020 12:10:15 +0300 Eli Zaretskii <[email-masked]> wrote:

>> From: Stephen Berman <[email-masked]>
>> Cc: [email-masked]
>> Date: Thu, 08 Oct 2020 10:39:38 +0200
>>
>> > bidi-paragraph-direction is set to left-to-right in any descendant of
>> > prog-mode, in particular in Emacs Lisp mode.  And yet I couldn't
>> > reproduce this in a Lisp buffer, no matter what I tried.  So that
>> > setting is not the only cause.
>>
>> Strange, because when I replace the above sexp in step 1 by the
>> following, I see the same problem at step 2:
>
> I tried reproducing the problem in a real-life .el file, not in a
> synthetic example with a single Lisp line.

I can see the problem is a real .el file, but it seems to depend on the
form of the line and other conditions I don't understand.  I visited
bindings.el and added the following line (with no line break, in case
one gets added to it in the email) at the end of the file:

(setq bla "Subject: Re: bug#39280: 27.0.60; wdired-get-filename ignores first argument")

Then I added a newline, evaluated (setq auto-hscroll-mode 'current-line
truncate-lines t) and enabled show-paren-mode.  With point at the
beginning of the above line I typed `C-e' and the line scrolled left and
the end of the line remained visible, i.e., no problem.  Then I deleted
the final `)', typed `C-a C-e' and the line scrolled left and then
immediately undid the hscroll so the end of the line was not visible but
after a fraction of a second it scrolled left again and the end of the
line remained visible.  Then I additionally deleted the final `"', typed
`C-a C-e' and the line scrolled left and now the end of the line
remained out of view indefinitely.  This even though the final line does
now does not end with a parenthesis group, in contrast to all previous
cases where I've seen the problem.  And indeed, if I restart the
experiment in a fresh emacs -Q and insert just `(setq bla "Subject: Re:
bug#39280: 27.0.60; wdired-get-filename ignores first argument' --
i.e. without the closing `")' -- plus a newline and make the other
necessary settings, then I see no hscrolling problem.  Can you replicate
these observations?

Steve Berman