Julian Bonilla

Emacs Shell Scrolling

I always have several bash shells running in Emacs (M-x shell). The default scrolling behavior drives me crazy.

If comint-scroll-show-maximum-output is non-nil, then arrival of output when point is at the end tries to scroll the last line of text to the bottom line of the window, showing as much useful text as possible. (This mimics the scrolling behavior of most terminals.) The default is set to True.

I don’t like chasing the output of shell commands to the bottom of the window.  You can add this to your  .emacs to keep the window from scrolling.

;; Don't scroll to bottom for shell output
(setq comint-scroll-show-maximum-output nil)