Subject: bug#24109: 24.5; Long lines in message mode make Emacs irresponsive

From: Yuri D'Elia <[email-masked]>
Date: Sat, 01 Oct 2016 20:25:57 +0200

On Sat, Oct 01 2016, Yuri D'Elia <[email-masked]> wrote:
> I noticed one thing while trying to restrict the problem: setting
> auto-hscroll-mode to nil, an error is shown in the *Messages* buffer
> instead of entering an infinite loop:
>
> previous-line: Beginning of buffer
>
> while not moving the cursor at all on the first invocation, but working
> on the second. If something is off there, it might as well be trigger
> horizontal scrolling and thus conflict with the current goal column.

Ok, after some testing, I was able to get a self-contained test case.
I was successfully able to test this into the current git's master with
emacs -q, built with lucid as the main toolkit.

Please load-file the attached sample. It will create a *test* buffer,
using a quoted representation of (buffer-substring) which is sufficient
to recreate the problem.

It will move the point to the beginning of the last line, as well as
switching on truncate-lines. Having the point on the beginning of the
line is important.

Switch to the *test* buffer and move up. It will hang at the "Luciaine"
line. I'm also attaching a screenshot of my current window state.

If you toggle auto-hscroll-mode instead, before scrolling, you'll see
how the cursor disappears instead when exactly at the beginning of the
line.