From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help Subject: *shell* jumps up and down Date: Sun, 24 Mar 2013 11:39:18 -0600 Message-ID: <20130324173918.GA30905@hysteria.proulx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1364146773 5045 80.91.229.3 (24 Mar 2013 17:39:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Mar 2013 17:39:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 24 18:40:00 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UJoti-0002ow-9q for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Mar 2013 18:39:58 +0100 Original-Received: from localhost ([::1]:43205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJotK-0004Xy-F6 for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Mar 2013 13:39:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJot8-0004Xr-5O for help-gnu-emacs@gnu.org; Sun, 24 Mar 2013 13:39:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJot6-00042O-3H for help-gnu-emacs@gnu.org; Sun, 24 Mar 2013 13:39:22 -0400 Original-Received: from joseki.proulx.com ([216.17.153.58]:33122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJot5-000425-Sz for help-gnu-emacs@gnu.org; Sun, 24 Mar 2013 13:39:20 -0400 Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id D594A211DA for ; Sun, 24 Mar 2013 11:39:18 -0600 (MDT) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id 8600E2DCDF; Sun, 24 Mar 2013 11:39:18 -0600 (MDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 216.17.153.58 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89719 Archived-At: 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