Essentially I wasn't aware that the kernel's TTY driver is supposed to
split reads into lines, which in theory should make everything work. The
problem was coming from the fact that emacs / TRAMP launches a shell inside
a shell inside a shell. The first shell is launched with `/bin/sh -i`, then
within that shell `INSIDE_EMACS` etc. is set and readline is disabled when
launching subsequent nested shells.
From what I can tell, the problem is then that the first shell sets the
TTY to raw mode when invoking the second shell. This shell is then non-
interactive and does not use readline, which causes it to read ahead.
This is the part I don't get. It's not bash that sets the shell to raw
mode, since there's not a tty in the mix, so it must be something in how
it's invoked, or another program that sets the terminal modes and then
execs bash.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/