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

From: Stephen Berman <[email-masked]>
Date: Wed, 07 Oct 2020 22:54:51 +0200

On Wed, 07 Oct 2020 10:08:23 +0300 Eli Zaretskii <[email-masked]> wrote:

>> From: Stephen Berman <[email-masked]>
>> Cc: [email-masked]
>> Date: Tue, 06 Oct 2020 22:05:42 +0200
>>
>> > Thanks, but having Gnus in the picture is too much.  Debugging
>> > redisplay issues involved in these momentary movements is hard as it
>> > is already.
>>
>> I believe you, and I wish I could remove Gnus from the recipe
>
> An alternative would be to figure out what display-related changes
> made by Gnus in that buffer affect this.  Then we could use those
> settings outside of Gnus to reproduce the issue.

I figured it out and you may be surprised.  Here's the new recipe:

0. emacs -Q
1. Evaluate the following sexp:

(let ((buf (get-buffer-create "*test*")))
  (with-current-buffer buf
    (setq auto-hscroll-mode 'current-line
	  truncate-lines t
	  bidi-paragraph-direction 'left-to-right)
    (insert "Subject: Re: bug#39280: 27.0.60; wdired-get-filename ignores first argument (this is a test)\n")
    (goto-char (point-min)))
  (show-paren-mode)
  (switch-to-buffer buf))

2. Now typing `C-e' shows the problem.

The settings of truncate-lines and bidi-paragraph-direction come from
gnus-summary-mode, the newline at the end of the inserted text is also
essential (I think I had omitted that when I though I couldn't replicate
the problem in another buffer).

Do you still want the output of trace-redisplay?

Steve Berman