0

A strange behaviour happens when I move up or down the point (using the keyboard): Emacs automatically scrolls up or down whenever I pass a certain line threshold. See here:

Scrolling example

When moving down, at line 20 the scroll locks (until I reach the end of the buffer). When moving up, the threshold is at line 10.

I would like to disable this scroll locking. That is, I would wish the point could move to the top or bottom of the screen withoug auto-locking the scroll. Any ideas? (Using GNU Emacs 24.4.4 in Linux and Mac.)

1

This is not how Emacs normally behaves. It looks as though you have configures something like scroll-margin. From the built-in help:

Number of lines of margin at the top and bottom of a window. Recenter the window whenever point gets within this many lines of the top or bottom of the window.

  • You must be right. I start with emacs -q, I don't get the undesired behaviour. Still, I haven't been able to detect the culprit in my init files. I have commented all lines containing "scroll", but with no luck yet. I also changed scroll-margin but also with no luck. – NVaughan Apr 3 '15 at 19:41
  • Try to do a "binary search", i.e. mark the first half of the file and do an eval-region. If the incorrect behaviour doesn't appear, it should be int he second half. From there, you can select a quarter of the file etc. until you find the culprit. Of course, there is also the risk of it being introduced by the site init files... – Lindydancer Apr 3 '15 at 20:00
  • I finally worked it out. The trouble was with the smooth-scrolling package. Even without my explicitly loading it from my init files, it got automatically loaded. Just because it was in my user-emacs-directory (in fact, it was in my elpa directory, inside my user-emacs-directory). Is it normal that all packages get autoloaded, unbeknownst to the user? – NVaughan Apr 4 '15 at 0:38
  • 1
    @NVaughan That's because you installed that package using the package manager and you have (package-initialize) in your init. From gnu.org/software/emacs/manual/html_node/emacs/… "To disable automatic package loading, change the variable package-enable-at-startup to nil." – Kaushal Modi Apr 4 '15 at 0:46
  • 1
    @NVaughan, once a package is installed it should present itself to the user using autoloads etc. but it should not automatically enable itself. The motivation behind this is that a user should be able to install packages without actually using them. (I learned this from a conversation with the people behind Melpa.) – Lindydancer Apr 4 '15 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.