Subject: shell should only allow input at the end of the buffer

From: Glenn Morris <[email-masked]>
Date: Wed, 12 Aug 2015 01:55:17 -0400

Package: emacs
Version: 24.5
Severity: minor

The behaviour of 'emacs -Q -f shell' when comint-scroll-to-bottom-on-input
is nil (the default) makes no sense. Enter some commands that produce more
than one page of output, eg "ls -la ~/" a few times. Scroll back to the
start of the buffer. Now if you type eg "date" it gets inserted at
point, not at the end of the buffer where the shell prompt is. Typing
RET sends garbage to the shell.

When comint-scroll-to-bottom-on-input is non-nil, input gets entered
into the correct place. This variable should only control scrolling.
Input should always get inserted at the end of the buffer. This is how
terminal emulators behave (eg "xterm +sk", or xfce-terminal's "scroll on
keystroke" option). The option is so you can enter something while
referring to previous output that has scrolled off the screen.

(BTW, for consistency with terminal emulators, perhaps the default
comint-scroll-to-bottom-on-input should be non-nil?)