From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Multi-tty design (Re: Reordering etc/NEWS) Date: Tue, 22 May 2007 08:37:53 +0200 Message-ID: <868xbhgy7y.fsf@lola.quinscape.zz> References: <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> <868xbmmbji.fsf@lola.quinscape.zz> <858xbjq320.fsf@lola.goethe.zz> <861whai9k1.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 1179815883 15590 80.91.229.12 (22 May 2007 06:38:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 22 May 2007 06:38:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 22 08:38:01 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 1HqO0P-0006nc-Do for ged-emacs-devel@m.gmane.org; Tue, 22 May 2007 08:38:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HqO0P-0000yx-2g for ged-emacs-devel@m.gmane.org; Tue, 22 May 2007 02:38:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HqO0K-0000y3-O0 for emacs-devel@gnu.org; Tue, 22 May 2007 02:37:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HqO0J-0000xd-AZ for emacs-devel@gnu.org; Tue, 22 May 2007 02:37:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HqO0J-0000xa-4Z for emacs-devel@gnu.org; Tue, 22 May 2007 02:37:55 -0400 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HqO0I-0007o9-BO for emacs-devel@gnu.org; Tue, 22 May 2007 02:37:54 -0400 Original-Received: from quinscape.de (dslnet.212-29-44.ip210.dokom.de [212.29.44.210] (may be forged)) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id IAA05242 for ; Tue, 22 May 2007 08:37:48 +0200 X-Delivered-To: Original-Received: (qmail 3219 invoked from network); 22 May 2007 06:37:53 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 22 May 2007 06:37:53 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 278648F832; Tue, 22 May 2007 08:37:53 +0200 (CEST) In-Reply-To: (Miles Bader's message of "Tue\, 22 May 2007 10\:54\:54 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 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:71574 Archived-At: Miles Bader writes: > David Kastrup writes: >>> I was thinking of (let ((process-environment (cons FOO >>> process-environment))) >> >> Do we actually have code like this around?t. > > Yes. > >> It would appear somewhat strange in pre-multitty since it more or >> less assumes that process-environment can contain multiple mentions of >> environment variables with only the first taking effect > > This usage style is explicitly supported by the C code which exports > process-enviroment -- it only exports the first occurance of any given > environment variable. > > Indeed, given this support, it's a much more elegant and efficient idiom > for elisp than copy+setenv.... Hm, maybe the shared tails idea will indeed be the most expedient idea for playing with several concepts. It appears to do the trick for most use cases. The only thing that does not really look nice is deleting the first element of the shared tail global-process-environment: one would have to do the deletion the hard way, by doing something like (setq tail (member "WHATEVER" process-environment)) (setcar tail (cadr tail)) (setcdr tail (cddr tail)) Which does not work when WHATEVER is the last environment variable... Maybe one should start global-process-environment with a dummy entry. Ugly. Is there any way to check whether process-environment is terminal-local (the global binding), or let-bound? Maybe a solution can be manufactured around that. -- David Kastrup