From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.help Subject: Re: [NEWBIE] exec path not expanding Date: Tue, 21 Oct 2003 21:56:22 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <86n0bupdp5.fsf@slowfox.dyndns.org> References: <615D3DBB-03E1-11D8-A446-000A957A7EA8@apple.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066766187 20619 80.91.224.253 (21 Oct 2003 19:56:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2003 19:56:27 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 21 21:56:25 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AC2cD-00068l-00 for ; Tue, 21 Oct 2003 21:56:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AC2by-00008B-5v for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Oct 2003 15:56:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AC2bT-000067-II for help-gnu-emacs@gnu.org; Tue, 21 Oct 2003 15:55:39 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AC2ax-0008Qm-Ky for help-gnu-emacs@gnu.org; Tue, 21 Oct 2003 15:55:38 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.24) id 1AC2aW-0008JK-LA for help-gnu-emacs@gnu.org; Tue, 21 Oct 2003 15:54:40 -0400 Original-Received: (qmail 16669 invoked by uid 65534); 21 Oct 2003 19:54:38 -0000 Original-Received: from p508E1FD5.dip.t-dialin.net (EHLO slowfox.dyndns.org) (80.142.31.213) by mail.gmx.net (mp006) with SMTP; 21 Oct 2003 21:54:38 +0200 X-Authenticated: #361006 Original-Received: by slowfox.dyndns.org (Postfix, from userid 1001) id 893694179; Tue, 21 Oct 2003 21:56:22 +0200 (CEST) Original-To: Robert Pollard In-Reply-To: <615D3DBB-03E1-11D8-A446-000A957A7EA8@apple.com> (Robert Pollard's message of "Tue, 21 Oct 2003 09:12:34 -0700") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (berkeley-unix) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13436 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13436 Robert Pollard writes: > On Tuesday, October 14, 2003, at 02:20 PM, Kai Grossjohann wrote: > >> Robert Pollard writes: >> >>> I am curious as to why my exec path is not expanding the PATH >>> variable. Does it expand it when it uses it or should it be expanded >>> in the exec-path variable? >> >> I guess that $PATH should be expanded already. I think that >> exec-path is initialized from $PATH. > > You are correct! Okay. So what does M-: (getenv "PATH") RET say in Emacs? >> In the shell where you start Emacs, have a look at $PATH. Does it >> contain them "$SYBASE" strings literally, dollar-sign and all? > > Technically, I don't start Emacs from a shell since it is a Mac OS X > app Hm, yeah. I hate that. How can people do any debugging in this circumstance? Argh :-( Do you have a menu item similar to the "Start/Run..." item in Windows? Then you could try to enter as the command "env" and check the "run in terminal" checkbox. If there is one. > but in a round about way it starts from my home, which does have the > expanded versions of the path names. If I go to the terminal and > printenv for PATH it has the path names expanded out. Home doesn't have much to do with PATH. But I think what you mean is that if you open a terminal window, then your current working directory is your home dir, and in that terminal window, the environment looks sane. But it could be that ~/.cshrc or ~/.login (I'm wildly guessing that MacOS is following the BSDish tradition of using csh by default) is playing psychotherapist to make your environment sane. Hm. Can't you start Emacs from the shell? Like "start Emacs.app" or "open Emacs.app" or something like this? Then you could compare an Emacs started from the shell with an Emacs started by double-clicking or whatever it is that one does on MacOS to start Emacs. >> Maybe PATH="$PATH" or setenv PATH "$PATH" might be useful things to >> type in the shell before starting Emacs. > > I believe it is correct. However, I don't know why Emacs doesn't see > it the same. Maybe it expands the variables before it uses and it is > some other problem??? I don't know what's is going on. For now, I'm > dragging the documents to Emacs instead of using Dired to find files. My guess is that the environment that Emacs starts in is different from the environment set up by the shell. Does this make sense? Kai