[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NEWBIE] exec path not expanding

From: Robert Pollard
Subject: Re: [NEWBIE] exec path not expanding
Date: Tue, 21 Oct 2003 14:28:01 -0700

Hello again,

On Tuesday, October 21, 2003, at 12:56 PM, Kai Grossjohann wrote:

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?

Here's the question and answers from another poster:

Hmmm. What do (getenv "SYBASE"), (getenv "SYBASE_OCS"), (getenv "SYBASE_ASE"),
and (getenv "PATH") return?

SYBASE = /Applications/Sybase/System

But in the terminal the variables are expanded as expected when using printenv PATH.

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

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.

I just tried it and it worked. If I run it from the command line it works fine (after I moved Emacs from the Applications folder to my Applications folder). It installed in the system's Application folder for whatever reason. When I double-click on the app it errors out as before. But, when I launch using the command line it works just fine. Would this be an indicator that my environment variables are not set up right when my system boots? Although, the terminal shows they are fine. Maybe there is another place the Mac sets environment variables for the user when they boot. I'll have to check on this.

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.

It uses .tcshrc.  tcshrc is the default shell for OS X.

Hm.  Can't you start Emacs from the shell?  Like "start" or
"open" 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.

This is the problem.

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?

You got it!

Now I have to figure out why!


Robert Pollard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]