I'm trying to get slime-repl to scroll in a certain way, and it's not
cooperating.
The way I'd ideally like emacs to work is to, when my cursor gets to the
bottom or top of the screen, to scroll by 5 lines or less. I'd prefer
it didn't scroll line-by-line, as my machine is kind of slow, but I
/NEVER/ want it to recenter the cursor as is the default - that drives
me crazy.
For normal editing, these settings do this for me:
(set-default 'scroll-up-aggressively 0.0)
(set-default 'scroll-down-aggressively 0.0)
(setq scroll-step 5
scroll-conservatively 0)
However, large amounts of output into slime-repl will still recenter the
cursor (hiss!). To try and get around this, I put this on
slime-repl-mode's hook:
;; attempt (ha!) to fix scrolling
(defun scroll-line-by-line ()
(make-local-variable 'scroll-step)
(make-local-variable 'scroll-conservatively)
(setq scroll-up-aggressively 0.0
scroll-down-aggressively 0.0
scroll-step 1
scroll-conservatively 100000))
This makes it scroll a line at a time (which isn't ideal), but seemed to
prevent it from ever recentering the screen (which I /REALLY/ don't
want.)
However, I just updated slime from CVS today, and now slime-repl seems
to want to recenter the screen again anyway. If the prompt is at the
last line of the screen, and I enter "'hello", it will print "HELLO" and
the next prompt will still be at the end of the screen. However, if I
say "(prin1 'hello)", it will recenter the screen and I'll have a bunch
of useless whitespace at the bottom of the screen.
Is there any way I can make it stop this? I really never want it to
recenter unless I explicitly call M-x recenter.
As a disclaimer, I'm convinced that emacs's model of scrolling is
completely broken - none of the variables that control scrolling work
the way they are documented, and they all interact in incredibly
confusing and broken ways. So perhaps slime-devel is the wrong place to
come with this. However, scrolling in slime-repl is what annoys me the
most.
I'm using GNU Emacs from CVS on Mac OS X (built for X11, not Carbon).
-bcd