Unscroll Minor Mode

Often when I edit a large file I have to jump to the beginning of the file to see and/or change macros, or to scroll the text few paragraphs away. Coming back to the point where I had been before could be difficult; I often forget to set the mark [C-SPACE] and so I have to scroll the text manually until I find the place where I was before.

I wrote an Emacs minor mode which automatically remembers cursor positions and positions of the text in Emacs buffer when any scrolling commands is invoked. By pressing [M-up/down] I can navigate between these stored points and so come back to the place where I was originally.

This mode is implemented as a single lisp file atim-unscroll.el. This file is also available on Emacs-Wiki.

Installation instructions:

  1. Put atim-unscroll.el into a directory in your load-path.
  2. Add the following to your ~/.emacs startup file.
      (require 'atim-unscroll)
      (atim-unscroll-global-mode) ;; to enable in all buffers
  3. Optional step(s):

    To enable atim-unscroll in just some types of buffers, comment out the `atim-unscroll-global-mode' and put atim-unscroll-mode in some major-mode hook, like:

       (add-hook 'c-mode-common-hook '(lambda () (atim-unscroll-mode)))

    Alternatively, do use `atim-unscroll-global-mode' and create exceptions using the `atim-unscroll-dont-activate' local variable, like:

       (add-hook 'c-mode-common-hook '(lambda () (setq atim-unscroll-dont-activate t)))