1

When I scroll up or down, Emacs automatically recenters the current position of point. I tried to disable this behavior by adding the following code to my configuration:

(setq scroll-margin 1
      scroll-conservatively 10000
      scroll-up-aggressively 0.01
      scroll-down-aggressively 0.01
      auto-hscroll-mode nil
      scroll-step 1)

Unfortunately, it doesn't work. I really tried all variables I can find.

NB: I am using AUCTeX and emacsclient.

  • 3
    Read the doc strings for scroll-step and scroll-conservatively and choose one or the other. I suggest you try Emacs -Q and set scroll-conservatively to 101 and see if you like it -- without any other settings. Then perhaps add scroll-margin if you want scrolling before reaching the window edges. My understanding is 101 and a billion trillion have the same effect. – lawlist Jun 1 '15 at 17:06
  • 1
    In fact, I tested without emacsclient, it works (no auto scrolling), but when i start emacs with emacs --daemon and then use emacsclient, even I've checked with C-h C-v that the scroll-conservatively is set to 101 (or sth big), it does auto scroll to center always. – seb Jun 1 '15 at 17:18
3

This variable preserves both the point and the screen position when scrolling:

(setq scroll-preserve-screen-position 'always)

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.