From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: exec-path and PATH Date: Sat, 19 Mar 2011 22:59:23 +0200 Message-ID: <83pqpmakt0.fsf@gnu.org> References: <86ipvfiyp0.fsf@gmail.com> <83vczfr0o0.fsf@gnu.org> <86ei63hxsz.fsf@gmail.com> <83tyez9g3n.fsf@gnu.org> <86wrjuhous.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1300568499 11865 80.91.229.12 (19 Mar 2011 21:01:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2011 21:01:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Christoph Scholtes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 19 22:01:35 2011 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 1Q13HC-0000l1-DF for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2011 22:01:34 +0100 Original-Received: from localhost ([127.0.0.1]:41729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q13HB-000295-Lm for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2011 17:01:33 -0400 Original-Received: from [140.186.70.92] (port=37333 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q13FM-0008NO-NI for emacs-devel@gnu.org; Sat, 19 Mar 2011 16:59:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q13FL-0003QJ-GC for emacs-devel@gnu.org; Sat, 19 Mar 2011 16:59:40 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:51860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q13FL-0003Q5-7S for emacs-devel@gnu.org; Sat, 19 Mar 2011 16:59:39 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LIB00800OR0SJ00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sat, 19 Mar 2011 22:59:20 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.131.120]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LIB008JPOYUSB10@a-mtaout23.012.net.il>; Sat, 19 Mar 2011 22:59:19 +0200 (IST) In-reply-to: <86wrjuhous.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 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:137434 Archived-At: > From: Christoph Scholtes > Cc: emacs-devel@gnu.org > Date: Sat, 19 Mar 2011 13:50:03 -0600 > > Eli Zaretskii writes: > > >> Can we set PATH to exec-path for the duration of the shell > >> execution? > > > > What do you mean by "shell execution"? > > While the shell is executing the external program. I don't see a point in this. PATH in process-environment is not used within Emacs except to pass it to sub-processes. Why would we want to restore its value after the sub-process exits? > > What I had in mind was that we should synchronize PATH with exec-path > > each time we invoke a subsidiary process, either through call-process > > or start-process. > > That should work, but I wonder if we want to do this work before every > process. Concatenating a few dozen of strings cannot take too much. > >> IIRC, if you change the PATH in a cmd session it only applies to > >> that session. > > > > But we don't change PATH _in_ the cmd session, we change it _before_ > > the session begins. > > I can change the PATH after running an instance of cmd.exe, no? It will > change the PATH for that session only, iirc. Yes, but how is this relevant to the issue at hand?