help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*shell* jumps up and down


From: Bob Proulx
Subject: *shell* jumps up and down
Date: Sun, 24 Mar 2013 11:39:18 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

After completion of a command the last line of the output is moved to
the last line in the buffer.  But anything that causes the buffer to
scroll causes it to center due to "Automatic Scrolling".  With short
command lines there is no problem.  But with any command line that
exceeds the width of the terminal then automatic scrolling centers
it.  The effect is that the *shell* buffer jumps up and down.

The width does not matter but assume an 80 column width for the
following test case.

  M-x shell
  $ echo Anything that is shorter than the terminal width.  All okay.
  $ M-p RET   ; all okay
  $ M-p RET   ; all okay
  $ echo Anything that is longer than the terminal width.  Causes the window to 
do "Automatic Scrolling" and center it.  Then RET (Enter) causes it to jump to 
the bottom.
  $ M-p RET   ; up, down
  $ M-p RET   ; up, down
  $ M-p RET   ; up, down

The problem is the interaction of "Automatic Scrolling" and something
in shell.el that tries to display the bottom of the buffer at the
bottom of the screen.  If I set (setq scroll-conservatively 10000)
then the problem is changed into a different behavior and mostly
avoids the jumping.  But I actually like the "Automatic Scrolling"
behavior.  What I don't like is the shell mode behavior of trying to
put the last line on the bottom of the screen.

I browsed through shell.el but couldn't see where it was doing this.
Does anyone know how to tell or modify the inferior shell process
window to not display the buffer at the very bottom and just let emacs
do what it would normally do?

Thanks,
Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]