Use M-x scroll-all-mode to scroll multiple buffers together.

Very useful for visually comparing two files which are hard to diff because of lots of trivial changes amongst the changes you are looking for.


It doesn’t work with the mouse wheel or scroll-bar (tested on both GNU Emacs 21.3 and 24.2.1).

Possible workaround for the mouse wheel issue:

(defun mwheel-scroll-all-function-all (func &optional arg)
  (if (and scroll-all-mode arg)
         (lambda (win)
           (select-window win)
           (condition-case nil
               (funcall func arg)
             (error nil)))))
    (funcall func arg)))

(defun mwheel-scroll-all-scroll-up-all (&optional arg)
  (mwheel-scroll-all-function-all 'scroll-up arg))

(defun mwheel-scroll-all-scroll-down-all (&optional arg)
  (mwheel-scroll-all-function-all 'scroll-down arg))

(setq mwheel-scroll-up-function 'mwheel-scroll-all-scroll-up-all)
(setq mwheel-scroll-down-function 'mwheel-scroll-all-scroll-down-all)

(tested with Emacs 24.2.1)

In emacs before 2002, scrolling by full pages was buggy.

See also

CategoryDisplay CategoryModes