0

I am in macOS Sierra using Emacs v25.1 (9.0).

When I scroll using my mouse, the cursor moves to the page I scroll to. However, I want to cursor to stay where it was prior to me starting the scrolling.

So far, I've not had any luck with many of the suggestions posted online (including https://superuser.com/questions/527356/dont-change-the-cursor-position-when-scrolling-in-emacs, including putting in my ~/.emacs the

(setq scroll-preserve-screen-position 1)

According to one post ((Ctrl + up/down)-style scrolling in Emacs), Emacs always wants cursor to be visible, however this behavior is modifiable with some coding (I'm afraid I am not good in lisp). I wonder if anyone knows of such a program.

I am currently using workaround (suggested in the post above) which is to place a mark with C-SPC C-SPC and then use C-u C-SPC when you want to return where you were.

Community
  • 1
  • 1
Lee Sande
  • 457
  • 5
  • 15
  • Wouldn't this quiestion be more suitable for SuperUser or the Emacs SE? – Michael Schumacher Dec 25 '16 at 19:48
  • 1
    Essentially, when redisplay finishes, point will always be on the visible window -- not above the window or below the window. The best you will ever achieve is a partially visible cursor with the appropriate setting when partly on the window and partly off the window. That's Emacs -- that 's life. I've marked the duplicate thread in the following comment. There is even an answer by the ex-chief-maintainer of Emacs. – lawlist Dec 25 '16 at 21:39

0 Answers0