I don't mean smooth scrolling, but keeping the cursor at a fixed point, and always moving one 'screenful', one line at a time, as one (in Eclipse or other IDEs) presses ctrl + up/down.

Then when one presses plain up/down, screen jumps if necessary in order to assure cursor's visibility.

Don't know how is it called.

Has it been implemented in Emacs?


Separation of cursor (point) and viewport (window) is common in modern GUI. Unfortunately the Emacs display engine does not allow this. It's not dogmatic, just technical. If you want to write this feature, I'm sure the development team will welcome it.

You do learn to live with it though.

It's interesting that you have so much success bending Emacs to your will. Personally, I find if I don't at least meet Emacs half-way, it gives me pain.

  • 1
    Maybe I expressed it too pompously :) but Emacs's such a pleasure to customize. Leaving aside that EL is not precisely the best lisp, it stands as an excellent example of how concision beats complexity. – vemv Mar 8 '12 at 16:37

As mentioned, Emacs does not offer this functionality nowadays. It could be implemented, but nobody bothered to do so yet, AFAIK [EDIT: actually, it looks like I mis-rememebered, and Martin did implement such a thing, see https://lists.gnu.org/archive/html/emacs-devel/2008-02/msg01892.html ]. The usual workaround 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.

  • 1
    Nice tip, thank you! – vemv Mar 21 '12 at 23:47

One of the great Emacs dogmas say that the cursor ("point" in Emacs-speak) always has to be visible, hence one cannot have the behavior you describe.

  • 2
    Dogmas, what the hell :( so far it's been all about bending Emacs at my will, not myself at Stallman's. Thanks for the answer. – vemv Mar 8 '12 at 11:29
  • 3
    Well, I myself find it highly irritating when scrolling commands can lead to the cursor not being visible, so I'm quite happy with that dogma. :) Also, remember that Emacs allows you to visit the same file in different windows, which is what I usually do when I need to skim the current file. You might find more ideas in this question here: superuser.com/questions/184340/… – pokita Mar 8 '12 at 12:14

I think what you're lookin for is that (from emacswiki's Scrolling page)

(defun gcm-scroll-down ()
  (scroll-up 1))

(defun gcm-scroll-up ()
  (scroll-down 1))

(global-set-key [(control down)] 'gcm-scroll-down)
(global-set-key [(control up)]   'gcm-scroll-up)

Your Answer

