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: Multi-tty design (Re: Reordering etc/NEWS) Date: Fri, 18 May 2007 10:24:29 -0400 Message-ID: References: <464835DE.3020007@lorentey.hu> <86y7jrr8rx.fsf@lola.quinscape.zz> <86lkfrr3s6.fsf@lola.quinscape.zz> <86d513r2i1.fsf@lola.quinscape.zz> <861whjr097.fsf@lola.quinscape.zz> <200705141648.l4EGmmvW007675@oogie-boogie.ics.uci.edu> <85bqgngvos.fsf@lola.goethe.zz> <200705141819.l4EIJLPr009832@oogie-boogie.ics.uci.edu> <85ps53fcm0.fsf@lola.goethe.zz> <200705142004.l4EK4DHg012188@oogie-boogie.ics.uci.edu> <85lkfrf91x.fsf@lola.goethe.zz> <200705142102.l4EL2pHK013655@oogie-boogie.ics.uci.edu> <4649D75C.2090905@lorentey.hu> <464A6144.10905@lorentey.hu> <86ejlfpfdj.fsf@lola.quinscape.zz> <861whepoq7.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179498284 9104 80.91.229.12 (18 May 2007 14:24:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 May 2007 14:24:44 +0000 (UTC) Cc: Andreas Schwab , Dan Nicolaescu , Karoly Lorentey , joakim@verona.se, emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 18 16:24:42 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 1Hp3No-0001pP-W3 for ged-emacs-devel@m.gmane.org; Fri, 18 May 2007 16:24:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hp3W1-0004yt-Po for ged-emacs-devel@m.gmane.org; Fri, 18 May 2007 10:33:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hp3Vy-0004yS-Bp for emacs-devel@gnu.org; Fri, 18 May 2007 10:33:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hp3Vw-0004yF-3F for emacs-devel@gnu.org; Fri, 18 May 2007 10:33:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hp3Vv-0004yC-V1 for emacs-devel@gnu.org; Fri, 18 May 2007 10:33:03 -0400 Original-Received: from 18.red-83-50-230.dynamicip.rima-tde.net ([83.50.230.18] helo=alfajor.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hp3Nf-0005mj-61; Fri, 18 May 2007 10:24:33 -0400 Original-Received: by alfajor.home (Postfix, from userid 20848) id 702A21C5F9; Fri, 18 May 2007 10:24:29 -0400 (EDT) In-Reply-To: <861whepoq7.fsf@lola.quinscape.zz> (David Kastrup's message of "Fri\, 18 May 2007 09\:36\:48 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) 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:71312 Archived-At: >> I didn't know that the MS-DOS port does make Emacs's terminal >> available directly to its subprocesses, but that can be easily >> accomodated. > I don't know about the port actually, and it is not a matter of making > the terminal available as much as the subprocess just taking it, I > think. You're nitpicking at my choice of word. It deosn't matter whether Emacs *makes* the terminal available" or whether the terminal just *is* available by virtue of the "OS". The point is just that this is a special case that can be easily accomodated (by not scrapping the TERM var in that case). > For everything that is not terminal-related, nothing but a single > environment makes sense, I think. Might be. But both the TERM and the DISPLAY variables at least need to be adjusted in subprocesses compared to what they were in Emacs's own environment. This is true regardless of multi-tty. And furthermore, for the TERM var, we both want to change it in subprocesses and keep it for reference. So (still ignoring mutli-tty), it would make sense to so something such as introduce a new var (could be read-only) say `initial-environment'. `process-environment' could start as empty and the environment passed to subprocesses would be the combination of `process-environment' and `initial-environment', where `process-environment' entries would take precedence over entries from `initial-environment'. This would break your AUCTeX code in a similar way to the current multi-tty code, but again, it's easy to fix: just loop over `initial-environment' instead of `process-environment'. For multi-tty, additionally to that, we could add a new terminal-local var (could also be read-only, for all I know) called `terminal-environment' which contains the environment inherited from a particular client. Then we could add a `terminal-environment-filter' variable which determines which environment variables are taken from `initial-environment' and which from `terminal-environment' when building the environment of a new subprocess. If you want this variable to be client-local instead of terminal-local, then just make it a global alist associating clients to their environments. Stefan