From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christoph Scholtes Newsgroups: gmane.emacs.devel Subject: Re: exec-path and PATH Date: Sat, 19 Mar 2011 13:50:03 -0600 Message-ID: <86wrjuhous.fsf@gmail.com> References: <86ipvfiyp0.fsf@gmail.com> <83vczfr0o0.fsf@gnu.org> <86ei63hxsz.fsf@gmail.com> <83tyez9g3n.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300564230 22515 80.91.229.12 (19 Mar 2011 19:50:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2011 19:50:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 19 20:50:26 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 1Q12AL-0001G5-UF for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2011 20:50:26 +0100 Original-Received: from localhost ([127.0.0.1]:34745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q12AL-00007M-EM for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2011 15:50:25 -0400 Original-Received: from [140.186.70.92] (port=41821 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q12AH-00007H-7A for emacs-devel@gnu.org; Sat, 19 Mar 2011 15:50:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q12AG-0000Qs-0V for emacs-devel@gnu.org; Sat, 19 Mar 2011 15:50:20 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:65334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q12AE-0000Qc-Qa; Sat, 19 Mar 2011 15:50:18 -0400 Original-Received: by iyf13 with SMTP id 13so6409281iyf.0 for ; Sat, 19 Mar 2011 12:50:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=wl5OmbguPlrHGRXqFS2AUUggDSiF0BUi/YQG9Fbnb/A=; b=hGHQ9F9v44h3zIo9SmnWvFX2lvML/mjJmAf8bFNIp/Iw9U5NAlkr448wvhTouapTHZ FuNpKk+DVle93qlKjJxocaMZwkXb5l8qPiX6syuTuzUKcp5ifPYJpwK0VuQPNjBmHWTd cummnG2n7CU0mQg4myWX8qNza6p4niadI/eW8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; b=lwOC0CpVJDJIeRzbhZPuz2xbRETyLbtNfOIQU6ap2Iqedmm93hFiZPKhITsEIEr4JB YNzC4OttVeTIhA6Knpvb1M7QhVkQuOQ7W9OoezWuzRiy4oDd/cSAW5UmCq6EzJTLuwQv GxGZG1QP7o3Vf/0mtK9THojg/Mb+bzIy5HTw0= Original-Received: by 10.42.75.6 with SMTP id y6mr4081058icj.10.1300564217977; Sat, 19 Mar 2011 12:50:17 -0700 (PDT) Original-Received: from localhost (71-208-187-99.hlrn.qwest.net [71.208.187.99]) by mx.google.com with ESMTPS id i2sm2757871icv.3.2011.03.19.12.50.14 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 19 Mar 2011 12:50:17 -0700 (PDT) In-Reply-To: <83tyez9g3n.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Mar 2011 19:26:20 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 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:137431 Archived-At: 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. > 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. It would be nicer to sync the two whenever exec-path is modified. I don't know if this is possible though when modifying exec-path diretcly via setq, for example. Maybe that's premature optimization tough. > There could be an issue with async subprocesses that are already > running, though: they still use the old PATH, while Emacs will see the > new value. This could lead to subtle bugs. This would only be a problem if the exec-path was modified between two processes. Also, this problem exists today, if I modify the PATH in between two processes via setenv, right? >> 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. Christoph