all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bob Proulx <bob@proulx.com>
To: help-gnu-emacs@gnu.org
Subject: *shell* jumps up and down
Date: Sun, 24 Mar 2013 11:39:18 -0600	[thread overview]
Message-ID: <20130324173918.GA30905@hysteria.proulx.com> (raw)

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	other threads:[~2013-03-24 17:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-24 17:39 Bob Proulx [this message]
2013-03-24 18:04 ` *shell* jumps up and down W. Greenhouse
2013-03-24 18:38   ` Bob Proulx
2013-04-02 18:11     ` Bob Proulx

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130324173918.GA30905@hysteria.proulx.com \
    --to=bob@proulx.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.