[Top][All Lists]

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

Re: (getenv "TERM") always returns "dumb"

From: Kai Grossjohann
Subject: Re: (getenv "TERM") always returns "dumb"
Date: Thu, 02 Sep 2004 11:06:38 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

> It would be simpler just to revert the change that was already made.
> What was the purpose of that change, anyway?  What problem was it
> intended to fix?

Most processes started from within Emacs do not talk to a smart
terminal, but they believe they do.  Setting $TERM to "dumb" would fix
that; then the processes believe they talk to a dumb terminal.

I had this problem in Tramp.  People were using fancy shell prompts on
the remote systems that were confusing Tramp.  Now Tramp explicitly
sets $TERM to "dumb" before invoking the remote shell, and the remote
shell init files can detect this situation and provide a
Tramp-friendlier prompt in this case.  (And users seem to buy the
argument that it makes no sense to use smart prompts on dumb terminals;-)

So I think it would be good to distinguish between two terminals: one
is the terminal type that Emacs itself is talking to, and the other
one is the terminal type that subprocesses of Emacs are talking to.

A side remark: Emacs running in a window system appears to inherit the
terminal type from the terminal it was started from.  That is, this
Emacs has (getenv "TERM") => "linux" because it was started from
~/.xinitrc, but an Emacs started from an xterm will have (getenv
"TERM") => "xterm".  But in both cases, M-x shell RET provides the
same terminal capabilities.  It does not make sense, IMVHO, that the
shell started from M-x shell RET should behave differently for these
two Emacs instances.


reply via email to

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