Subject: bug#9324: 24.0.50; Movement past end of screen causes weird jump

From: Eli Zaretskii <[email-masked]>
Date: Fri, 19 Aug 2011 20:15:19 +0300

> From: Ivan Andrus <[email-masked]>
> Date: Fri, 19 Aug 2011 18:19:47 +0200
> Cc: [email-masked],
>  [email-masked]
> 
> In case you are interested in what happens in my contaminated emacs, if I run C-x = after (forward-sexp) then it says a left parenthesis, but if I use `(progn (forward-sexp)(what-cursor-position))` then it says the next character is C-j.  Furthermore, changing it to (prog2 (forward-sexp) (what-cursor-position) (redisplay)) causes it to work properly (i.e. no bug).

If invoking `redisplay' fixes the problem, it means some display
optimization is misfiring.  But there are quite a few of those
optimizations, so without a reproducible test case, it's really hard
to say where to look.

> I guess I'm probably on my own on this one, since even I can't reproduce it reliably in emacs -Q, so what functions that I should start debugging?

I agree with Antoine: if you can reliably reproduce this with your
~/..emacs, bisect it to find the minimal customizations necessary to
reproduce the problem, then post that information here.