Subject: Re: bug#1166: 23.0.60; Point jumps instead of scrolling in the new line

From: "Lennart Borgman (gmail)" <[email-masked]>
Date: Tue, 14 Oct 2008 20:29:20 +0200

Lennart Borgman (gmail) wrote:
> I have found a bug where point jumps to a new postion instead of a new
> line beeing scrolled into the selected window. I am unable to narrow it
> down, but I can reproduce it (but I am not sure about what makes it
> happens). Just to get some thoughts I write down what I have seen so far
> here.
> 
> The scenario is this:
> - Point is on the last line in the window.
> - I press "o" in viper. This opens a line below the current line and
> puts the point on this line.
> 
> What I expect to happen is that this new line is scrolled into the
> window. Sometimes this happens. Sometimes instead point jumps up, maybe
> 10 lines (I did not count them at all) and the window is not scrolled so
> the new line is not visible.
> 
> There are some other ingredients too:
> - I believe that nxml-mode (or a derivative) must be the major mode.
> - If I remove nxml-after-change from after-change-functions the bug
> disappears.
> - If I try to use edebug it also disappears.
> 
> Maybe those ingredients also are required, I am not sure since I can't
> easily reproduce the bug yet:
> - visual-line-mode.

Yes, visual-line-mode is required too. More precisely only `word-wrap'
needs to be set to t for the bug to appear.

> Does anyone have any idea of how to find out what the problem is? In
> nxml-after-change there is a whole bunch of "save-*" macros. I commented
> out them all, but the bug still appears. But where is the scrolling done?
> 
> 
> (Note that I am using my patched version right now when investigating
> the bugs, but I do not think it matters here.)
> 
> In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
>  of 2008-10-14 (patched)
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --cflags -Ic:/g/include'
> 
> 
> 
> 
>