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: simple useful functions Date: Mon, 06 Dec 2010 14:31:52 -0500 Message-ID: References: <20101028.115615.04128253.Takaaki.Ota@am.sony.com> <20101203.153710.363898753.Takaaki.Ota@am.sony.com> <20101203.185802.425329138.Takaaki.Ota@am.sony.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291663932 14346 80.91.229.12 (6 Dec 2010 19:32:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Dec 2010 19:32:12 +0000 (UTC) Cc: Tak Ota , emacs-devel@gnu.org To: Rene@Kyllingstad.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 06 20:32:01 2010 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.69) (envelope-from ) id 1PPgn2-0000Nh-U9 for ged-emacs-devel@m.gmane.org; Mon, 06 Dec 2010 20:32:01 +0100 Original-Received: from localhost ([127.0.0.1]:46194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPgn2-0008TK-Be for ged-emacs-devel@m.gmane.org; Mon, 06 Dec 2010 14:32:00 -0500 Original-Received: from [140.186.70.92] (port=50932 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPgmw-0008OD-NQ for emacs-devel@gnu.org; Mon, 06 Dec 2010 14:31:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPgmv-0006Cd-Ez for emacs-devel@gnu.org; Mon, 06 Dec 2010 14:31:54 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:31146 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPgmv-0006CY-BQ for emacs-devel@gnu.org; Mon, 06 Dec 2010 14:31:53 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcJAP/I/ExFxLmf/2dsb2JhbACVJY0LgQtyvnGDDQGCOwSEX419 X-IronPort-AV: E=Sophos;i="4.59,306,1288584000"; d="scan'208";a="84685980" Original-Received: from 69-196-185-159.dsl.teksavvy.com (HELO ceviche.home) ([69.196.185.159]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 06 Dec 2010 14:31:52 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 2E75B661BF; Mon, 6 Dec 2010 14:31:52 -0500 (EST) In-Reply-To: (=?iso-8859-1?Q?=22Ren=E9?= Kyllingstad"'s message of "Mon, 6 Dec 2010 15:08:30 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:133467 Archived-At: >> I partly understand the context. =A0But right here I think your script >> fails to serve you: it uses `setenv' which affects all inferior >> processes, so if you're working on several projects at the same time >> from the same Emacs session (likely if you're using it as a work >> environment, which is also the intended use to a large extent), you get >> pollution from one project to the other. =A0I think this issue is >> important, and I suspect that figuring out how it should be solved is >> necessary to figure out what is a good/generic way to provide this >> "source" feature. > As long as the login script sets up the environment needed you just > need to run a source command when switching between the projects to > override the environment. You may use the various projects "at the same time", so "switching" may be annoying if not problematic. Furthermore, sometimes you can't just accumulate the changes and hope that things still work, so instead you need to first undo one of the envs and then apply the other env. > A cleaner solution would be to attach the environment to a project > concept within Emacs, but when someone offers a shed it seems unfair > to ask them to build the whole city around it. If it sounded like I was asking him to write an IDE as a prerequisite for his change, I'm sorry for it, that was not my intention. We already have .dir-local.el which we might be able to use for that: a command that extracts the env from a setup script and puts the result in some var in a .dir-local.el; and then tweak things like M-x compile to pay attention to that var. Stefan