From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: (getenv "TERM") always returns "dumb" Date: Fri, 03 Sep 2004 13:24:06 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <86656xox9d.fsf@ketchup.de.uu.net> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1094232272 12281 80.91.224.253 (3 Sep 2004 17:24:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 3 Sep 2004 17:24:32 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 03 19:24:22 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C3HnS-0000vL-00 for ; Fri, 03 Sep 2004 19:24:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C3HsT-00031j-SN for ged-emacs-devel@m.gmane.org; Fri, 03 Sep 2004 13:29:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C3HsL-00031L-2E for emacs-devel@gnu.org; Fri, 03 Sep 2004 13:29:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C3HsK-00030w-DD for emacs-devel@gnu.org; Fri, 03 Sep 2004 13:29:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C3HsK-00030t-9V for emacs-devel@gnu.org; Fri, 03 Sep 2004 13:29:24 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C3HnC-0000yt-W5 for emacs-devel@gnu.org; Fri, 03 Sep 2004 13:24:07 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1C3HnC-00047G-6a; Fri, 03 Sep 2004 13:24:06 -0400 Original-To: Kai Grossjohann In-reply-to: <86656xox9d.fsf@ketchup.de.uu.net> (message from Kai Grossjohann on Thu, 02 Sep 2004 11:06:38 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26751 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26751 Most processes started from within Emacs do not talk to a smart terminal, but they believe they do. Why do they believe they do? Is it because the Lisp code that starts them does not specify "dumb" as the terminal type? If so, the straightforward solution is to change the Lisp code that invokes them. It may seem inelegant, but at least it doesn't cause any problems. So I have reverted the change. 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. Yes, and M-x shell (through comint) sets TERM to `dumb' or `emacs'.