7
votes

Emacs23 GUI in Ubuntu 10.04 LTS. I've previously not changed any settings relating to Emacs scrolling behaviour. However, today I noticed a peculiar jumping behaviour when scrolling down in a buffer -- the cursor down key would scroll down as normal to a point and then the next keypress down would sometimes scroll the buffer down instead or sometimes appear to scroll the buffer up and then move the selected line down. It appeared to be more buggy behaviour rather than the normal or predictable jumping of the buffer. If I held down the down cursor the screen would jump and scroll and stutter and then lurch forward and then stutter.

I searched for some answers and tried a few mentioned here, but nothing solved the problem. Only then did I realize that this behaviour is new -- it only appeared after I changed the font in the buffer with C-x C--. When I returned the font to the "default" with C-x C-+, the scrolling behaviour returned to normal (the point moves to the last line, then the next press scrolls a few lines and moves the point up and displays the lines below; this is the default I think and I'm happy with it). Ideas?

Edit: Scrolling up works fine (as expected/default) regardless of font-size changes. Changing the font smaller a second time only makes the scrolling more bizarre.

Edit: Temporary workaround: return to using emacs -nw

Update: Tested on another Ubuntu 10.04 machine (desktop). Launched Emacs 23 and loaded a log file. Maximized Emacs. Help down cursor and scrolling worked as normal -- the cursor gets to the bottom, the buffer scrolls and the cursor moves to the middle of the screen. C-x C-- to reduce font size. Scroll down again. Same strange jerky behaviour, where some jumps don't seem to even move the buffer properly. Enlarge font once, and scrolling returns to normal. Scrolling up is fine regardless of font size. I searched the Emacs bug tracker briefly but did not find a bug which matched.

2
Weird. FWIW I don't have this problem with Emacs 23.3.1 in Cygwin.jaybee
I also have this problem on GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7601) from trunk 2011-02-16 on LENNART-69DE564 (patched)harpo

2 Answers

1
votes

I've had this problem (or something very similar) for a long time. I finally found something (on EmacsWiki) that's working:

(setq auto-window-vscroll nil)

Without this, the buffer will not scroll down correctly when I've altered the font size, regardless of my scroll settings, which are, for what it's worth,

(setq scroll-conservatively 10)
(setq scroll-margin 7)
1
votes

Consider filing an Emacs bug: M-x report-emacs-bug.