From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: setevn PATH vs exec-path [was Re: Flyspell error] Date: Wed, 5 Aug 2009 10:25:17 -0700 Message-ID: References: <66ade717-927b-4304-bf4b-104d0848cc5c@u16g2000pru.googlegroups.com><844648ac-0b6c-44b0-bfee-ac5f147ce0f9@u38g2000pro.googlegroups.com><2537dd5a-5644-416b-be14-38877d92bf5c@g1g2000pra.googlegroups.com><74580316-83d3-4fca-910c-f8faa0935195@t11g2000prh.googlegroups.com ><1e28e3b6-5be0-4d3e-a290-1d18d6812ed2@u16g2000pru.googlegroups.com> <83iqh2npx7.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1249493164 21955 80.91.229.12 (5 Aug 2009 17:26:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2009 17:26:04 +0000 (UTC) To: "'Eli Zaretskii'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 05 19:25:57 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MYkFK-0003H2-NS for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2009 19:25:51 +0200 Original-Received: from localhost ([127.0.0.1]:36275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYkFJ-00086N-Sp for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2009 13:25:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYkF0-00085u-5e for help-gnu-emacs@gnu.org; Wed, 05 Aug 2009 13:25:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYkEu-00081u-Gh for help-gnu-emacs@gnu.org; Wed, 05 Aug 2009 13:25:28 -0400 Original-Received: from [199.232.76.173] (port=55794 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYkEu-00081p-D1 for help-gnu-emacs@gnu.org; Wed, 05 Aug 2009 13:25:24 -0400 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:39884 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MYkEr-0000gy-JK; Wed, 05 Aug 2009 13:25:21 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n75HPGC8002859 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Aug 2009 17:25:17 GMT Original-Received: from abhmt007.oracle.com (abhmt007.oracle.com [141.146.116.16]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n75HPfM9000330; Wed, 5 Aug 2009 17:25:41 GMT Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Aug 2009 10:25:16 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcoV8F9gkFnnpxHqTG2P2C1oheeWJgAAD1kg In-Reply-To: <83iqh2npx7.fsf@gnu.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt007.oracle.com [141.146.116.16] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010209.4A79C07C.0218:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66799 Archived-At: > Actually, my advice is to have them both identical (well, actually, > equivalent, not identical, because one is a list while the other is a > string). That's because exec-path is used when Emacs invokes programs > directly (e.g., via `call-process') while PATH is used indirectly when > Emacs invokes programs via the shell, like in "M-x compile" > or "M-x grep". > In the latter case, the shell will look for programs along PATH. > If your values are not equivalent, some Emacs commands that invoke > subsidiary programs will mysteriously fail, and unless you know very > well which Emacs command uses the shell and which does not, you will > have hard time figuring out how to set them correctly. > > Of course, if PATH is modified before Emacs is started, then exec-path > will be automatically equivalent to PATH, because it's computed from > PATH's value. It might be good to add that advice to the Emacs manual. The last sentence, about the default value of `exec-path', is there (in nodes `Single Shell' and `Interactive Shell'), but not the rest. There is also env var EMACSPATH, which is used to initialize `exec-path' (see node `General Variables'). Note that the same thing is said, in the same node, about env var `PATH'. Nothing is said about which of them takes precedence, if both env vars are defined. And while PATH is mentioned in nodes `Single Shell' and `Interactive Shell' as the start-time source of `exec-path', EMACSPATH is not mentioned beyond the one-liner in node `General Variables'.