From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: kj Newsgroups: gmane.emacs.help Subject: Emacs mishandles subshell's terminal's size Date: Mon, 6 Dec 2010 21:02:48 +0000 (UTC) Organization: none Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1291949977 22127 80.91.229.12 (10 Dec 2010 02:59:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 02:59:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 10 03:59:33 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQtCm-0005du-H1 for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Dec 2010 03:59:32 +0100 Original-Received: from localhost ([127.0.0.1]:45180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQtCl-0007UO-Pz for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 21:59:31 -0500 Original-Path: usenet.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-NNTP-Posting-Host: panix2.panix.com Original-X-Trace: reader1.panix.com 1291669368 19818 166.84.1.2 (6 Dec 2010 21:02:48 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Mon, 6 Dec 2010 21:02:48 +0000 (UTC) X-No-Confirm: yes User-Agent: nn/6.7.3 Original-Xref: usenet.stanford.edu gnu.emacs.help:182941 X-Mailman-Approved-At: Thu, 09 Dec 2010 20:09:23 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77239 Archived-At: I often run zsh as a subprocess (which I'll denote zsh1) of an Emacs process that is itself a subprocess of another zsh process (which I'll denote zsh0); basically, a zsh0/Emacs/zsh1 sandwich. (FWIW, I initiate the zsh1 by running "M-x shell" in Emacs.) The problem I have is that the values of COLUMNS in zsh0 and zsh1 do not match (zsh0 being the one that has it right), even if I run "export COLUMNS" right before starting Emacs. In zsh0, I get the following: % export COLUMNS % typeset +m COLUMNS integer 10 exported COLUMNS % echo $COLUMNS 126 This width is correct. If now I run Emacs, and in its *scratch* buffer I immediately evaluate the Lisp expression "(window-width)", the value echoed is 126, in agreement with zsh0's $COLUMNS. So Emacs *knows* the correct window width. But now, if I start zsh1 from this very same Emacs session, this is what zsh1 reports: % typeset +m COLUMNS integer 10 exported COLUMNS % echo $COLUMNS 80 According to the Emacs documentation, Emacs inherits environment variables from its parent shell, and passes those environment variables to any subprocess shell it spawns. Judging from the above, this is apparently not happening for me. How can I coax Emacs into setting the COLUMNS of the subshell properly? TIA! ~kj