From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Post-22.1 development? Date: Wed, 13 Jun 2007 13:39:04 -0400 Message-ID: References: <878xb05ras.fsf@stupidchicken.com> <200706101559.l5AFxBFb006829@oogie-boogie.ics.uci.edu> <86fy4yg62v.fsf@lola.quinscape.zz> <466ED07F.9000002@gnu.org> <85fy4wx1tb.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181756363 2070 80.91.229.12 (13 Jun 2007 17:39:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2007 17:39:23 +0000 (UTC) Cc: jasonr@gnu.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 13 19:39:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HyWoT-0004TY-LV for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2007 19:39:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyWoT-0003TG-42 for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2007 13:39:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HyWoO-0003T1-Sv for emacs-devel@gnu.org; Wed, 13 Jun 2007 13:39:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HyWoM-0003Sp-FQ for emacs-devel@gnu.org; Wed, 13 Jun 2007 13:39:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyWoM-0003Sm-Ae for emacs-devel@gnu.org; Wed, 13 Jun 2007 13:39:14 -0400 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HyWoJ-0007Yq-42; Wed, 13 Jun 2007 13:39:11 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 900352CF231; Wed, 13 Jun 2007 13:39:08 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 4854F3FE0; Wed, 13 Jun 2007 13:39:04 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 34CA46C812; Wed, 13 Jun 2007 13:39:04 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Wed\, 13 Jun 2007 12\:22\:04 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: Linux 2.6 (newer, 3) 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:72788 Archived-At: > Actually, the value of TERM is only for internal use and should never be > passed on to subprocesses, so its presence in process-environment is > not important. > That is true, in a sense. However, at present the primitives to create > subprocesses just pass TERM along to the subprocess. Thus, it is up to > the Lisp code to set it. Yes and it's a bug (which occasionally causes things like subprocesses returning to Emacs ASCII escape sequences where they're not expected). This bug was temporarily "fixed" (by yours truly) some time in the past on the CVS trunk by removing TERM from process-environment at startup (or rather setting it to a safe default such as "TERM=dumb"). This is fundamentally the right thing to do, although the way I did this was wrong (which is why it was later reverted). The right way to do it is to remove it from process-environment (i.e. remove it from the environment passed to subprocesses) but store it elsewhere. I think in general, we should be careful to distinguish the environment inherited from our parent process (which is currently available only through process-environment but should be stored elsewhere so as to be available even after modifying process-environment) from the environment that will be passed to subprocesses (which is obviously process-environment, as the name clearly implies). > Should this work differently? Should we do something in call-process > and start-process to set TERM? It should be done directly at startup. Stefan