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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 01 Oct 2016 20:47:00 +0300

> From: Yuri D'Elia <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked]
> Date: Sat, 01 Oct 2016 19:10:27 +0200
> 
> On Thu, Jan 01 1970, Yuri D'Elia <[email-masked]> wrote:
> >> What are your values of hscroll-step and hscroll-margin?
> 
> hscroll-step 0
> hscroll-margin 5
> 
> (default values)
> 
> > In addition to the above, here's one more: when hscroll_window_tree is
> > called with w->hscroll already non-zero (i.e. after the display engine
> > scrolls the window to bring point into the view), how come it tries
> > again to hscroll the window?  The complicated condition that starts at
> > line 12993 is supposed to yield false in that case, because the X
> > coordinate of the cursor, stored in w->cursor.x, is now supposed to be
> > between the left and the right hscroll margins.  Why isn't that
> > happening in your case?
> >
> > Some values that might help understand the answer to the above are:
> >
> >   in C:
> >     w->cursor
> >     w->min_hscroll
> >   in Lisp:
> >     hscroll-step
> >     hscroll-margin
> 
> It took me a while to sit down on this issue again.

Thanks, I hope you will be able to answer the rest of the questions
above, so I could continue looking into this problem.

> 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

Could be related.  previous-line signals this error whenever its
subroutines report that point moved zero lines (more accurately, less
lines than they were asked to move).  It doesn't really check if it
hit BOB.

> 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.

Sorry, I don't understand what the last sentence tries to say.

Thanks.