0

I'm new to Emacs and trying to learn it using the built-in manuals (tutorial, manual and lisp intro).

I used (setq scroll-step 1) to avoid jumps in the normal mode, yet when viewing info - the scroll is still jumpy.

How do I fix that?

lithuak
  • 101
  • 1
  • 1
    Try removing the `scroll-step` setting and replace it with `(setq scroll-conservatively 101)`, but don't be tempted to be one of those people who set the value to 100 zillion, because anything over 100 has the same effect (see the doc-string for the variable). If that setting has to be *only* in info-mode and you like the default jumping in all other modes, then the variable can be made buffer local for just info-mode using a major-mode hook for said mode and `setq-local` .... – lawlist Oct 05 '20 at 18:50
  • @lawlist thanks you so much, it looks to be working! I'd prefer smooth scrolling everywhere. – lithuak Oct 05 '20 at 19:06
  • 1
    @lithuak: Please go back to the place where you found the recommendation to use `(setq scroll-step 1)` and try and fix it there to avoid misdirecting other users. We already explain it in `C-h o scroll-step`, but obviously people don't read it. – Stefan Oct 05 '20 at 19:58
  • I suggest you try the **default** values of `scroll-conservatively` and `scroll-step`, which are both `0`. IOW try *not customizing* these options at all. – Drew Oct 05 '20 at 22:02

2 Answers2

1

The O.P. has indicated in a comment underneath the question that he/she has tried (and likes) the recommended setting (also set forth in a comment) of (setq scroll-conservatively 101); and, that the O.P. prefers that the setting be global (as opposed to just buffer-local for a particular major-mode). Many examples scattered over the internet use a value in excess of 101 for this particular variable, probably because the users were unaware that anything greater than 100 has the same effect. The *Help* buffer for M-x describe-variable aka C-h v contains the following language:

scroll-conservatively is a variable defined in ‘C source code’.
Its value is 0

  You can customize this variable.
  Probably introduced at or before Emacs version 20.1.

Documentation:
Scroll up to this many lines, to bring point back on screen.
If point moves off-screen, redisplay will scroll by up to
‘scroll-conservatively’ lines in order to bring point just barely
onto the screen again.  If that cannot be done, then redisplay
recenters point as usual.

If the value is greater than 100, redisplay will never recenter point,
but will always scroll just enough text to bring point into view, even
if you move far away.

A value of zero means always recenter point if it moves off screen.
lawlist
  • 18,826
  • 5
  • 37
  • 118
0

Emacs FAQ > Common requests > Scrolling only one line:

How can I force Emacs to scroll only one line when I move past the bottom of the screen?
Customize the scroll-conservatively variable and set it to a large value like, say, 10000.

Alternatively, use the following Lisp form in your init file:

(setq scroll-conservatively most-positive-fixnum)