Subject: Re: bug#14780: Acknowledgement (Regression: C-n doesn't go to next line under simple circumstances)

From: Barry OReilly <[email-masked]>
Date: Fri, 19 Jul 2013 15:53:35 -0400

Use this /tmp/cant-next-line.el to automate a little more.

(tool-bar-mode 0)
(global-whitespace-mode 1)
(set-face-attribute 'default nil :height 80)
(setq scroll-margin 4)
(setq scroll-conservatively 101)
(add-hook 'emacs-startup-hook (lambda ()
                                (re-search-forward "here")
                                (trace-redisplay)
                                ;; Doesn't reproduce it, have to C-n manually
                                ;; (run-at-time "1 sec" 1 (lambda ()
                                ;;
(call-interactively 'next-line)))
                                ))

Reproduction won't happen if you:
  - resize the window
  - use M-x next-line instead of C-n
  - press and hold C-n
  - navigate in ways other than prescribed

I can see it everytime I follow the recipe.

Here is the trace-redisplay resulting from:
  ./src/emacs -r -Q --load /tmp/cant-next-line.el /tmp/cant-next-line.txt
  Then C-n 5 times

redisplay_internal 0
0x110d9a0 (cant-next-line.txt): same window start
0x110d9a0 (cant-next-line.txt): 1
0x110d9a0 (cant-next-line.txt): same window start
0x110d9a0 (cant-next-line.txt): 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_internal 0
0x110d9a0 (cant-next-line.txt): cursor movement
0x110d9a0 (cant-next-line.txt): try_scrolling
redisplay_internal 0
0x110d9a0 (cant-next-line.txt): forced window start
redisplay_preserve_echo_area (7)
redisplay_internal 0
redisplay_internal 0
0x110d9a0 (cant-next-line.txt): forced window start
redisplay_preserve_echo_area (7)
redisplay_internal 0
redisplay_internal 0
0x110d9a0 (cant-next-line.txt): forced window start
redisplay_preserve_echo_area (7)
redisplay_internal 0
redisplay_internal 0
0x110d9a0 (cant-next-line.txt): forced window start
redisplay_preserve_echo_area (7)
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0