all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs mishandles subshell's terminal's size
@ 2010-12-06 21:02 kj
  0 siblings, 0 replies; only message in thread
From: kj @ 2010-12-06 21:02 UTC (permalink / raw
  To: help-gnu-emacs




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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-06 21:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 21:02 Emacs mishandles subshell's terminal's size kj

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.