all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to make emacs path aware on MacOSX
@ 2011-04-13 12:14 Young, Ed
  2011-04-13 20:53 ` Edward O'Connor
  2011-04-13 20:58 ` Perry Smith
  0 siblings, 2 replies; 8+ messages in thread
From: Young, Ed @ 2011-04-13 12:14 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

Apologies if this is the wrong forum for this. If so please redirect me.

I am running emacs on MacOSX, installed from a DMG file.

It works great, but it is not aware of my path, so I can't execute commands like 'git' or 'svn' etc.

How can I configure it to be aware of my path. I'm using the global path variable file /etc/profile.

[-- Attachment #2: Type: text/html, Size: 753 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make emacs path aware on MacOSX
  2011-04-13 12:14 How to make emacs path aware on MacOSX Young, Ed
@ 2011-04-13 20:53 ` Edward O'Connor
  2011-04-13 20:58 ` Perry Smith
  1 sibling, 0 replies; 8+ messages in thread
From: Edward O'Connor @ 2011-04-13 20:53 UTC (permalink / raw)
  To: Young, Ed; +Cc: help-gnu-emacs@gnu.org

> Apologies if this is the wrong forum for this. If so please redirect me.
> I am running emacs on MacOSX, installed from a DMG file.
> It works great, but it is not aware of my path, so I can't execute commands
> like 'git' or 'svn' etc.
> How can I configure it to be aware of my path. I'm using the global path
> variable file /etc/profile.

/etc/profile only affects the Bourne shell or processes descended from
such a shell.

If you want global path changes to be visible to all programs, use
/etc/paths & /etc/paths.d/


HTH.
Ted



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make emacs path aware on MacOSX
  2011-04-13 12:14 How to make emacs path aware on MacOSX Young, Ed
  2011-04-13 20:53 ` Edward O'Connor
@ 2011-04-13 20:58 ` Perry Smith
  2011-04-13 23:00   ` Peter Dyballa
  2011-04-14  2:17   ` Young, Ed
  1 sibling, 2 replies; 8+ messages in thread
From: Perry Smith @ 2011-04-13 20:58 UTC (permalink / raw)
  To: Young, Ed; +Cc: help-gnu-emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]


On Apr 13, 2011, at 7:14 AM, Young, Ed wrote:

> Apologies if this is the wrong forum for this. If so please redirect me. 
> 
> I am running emacs on MacOSX, installed from a DMG file. 
> 
> It works great, but it is not aware of my path, so I can't execute commands like 'git' or 'svn' etc. 
> 
> How can I configure it to be aware of my path. I'm using the global path variable file /etc/profile. 

The Finder on the Mac (that starts emacs) doesn't look at /etc/profile, etc.  For a particular user, it does look at ~/.MacOSX/environment.plist

Its a "property list" thing that is normal for Mac settings.  You can find it documented more on Mac forums and those kinds of places.

e.g. http://developer.apple.com/library/mac/#qa/qa1067/_index.html

If you are talking about shells started within emacs, thats a different matter.

HTH,
pedz


[-- Attachment #2: Type: text/html, Size: 1583 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make emacs path aware on MacOSX
  2011-04-13 20:58 ` Perry Smith
@ 2011-04-13 23:00   ` Peter Dyballa
  2011-04-14  2:17   ` Young, Ed
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2011-04-13 23:00 UTC (permalink / raw)
  To: Perry Smith; +Cc: help-gnu-emacs@gnu.org, Young, Ed


Am 13.04.2011 um 22:58 schrieb Perry Smith:

> The Finder on the Mac (that starts emacs) doesn't look at /etc/ 
> profile, etc.


It's *not* the Finder (it's Launch Service).

Another way to setup PATH is in your init file:

	(setenv "PATH" (concat "/some/directory" path-separator (getenv  
"PATH")))


Your shell can be corrected via ~/.emacs_<name of the shell  
interpreter>.

--
Greetings

   Pete

Isn't vi that text editor with two modes... one that beeps and one  
that corrupts your file?
				– Dan Jacobson, on comp.os.linux.advocacy




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make emacs path aware on MacOSX
  2011-04-13 20:58 ` Perry Smith
  2011-04-13 23:00   ` Peter Dyballa
@ 2011-04-14  2:17   ` Young, Ed
  2011-04-14  9:05     ` Peter Dyballa
  1 sibling, 1 reply; 8+ messages in thread
From: Young, Ed @ 2011-04-14  2:17 UTC (permalink / raw)
  To: Perry Smith; +Cc: help-gnu-emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]

Thanks for the reply.

I must not have the environment syntax right.

I was able to set the path by adding in individual path elements like this:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/comcast/software/groovy/current/bin:/opt/comcast/software/grails/current/bin:/usr/local/git/bin:/usr/X11/bin:/opt/comcast/software/gradle/current/bin

But what I wanted to do was to set up some environment variables and include them in the path so as to shorten it:

SW_HOME /opt/summitbid/software
GROOV_HOME $SW_HOME/groovy/currrent

Path …:$GROOVY_HOME:/bin

But GROOVY_HOME never resolves to the actual path.


From: Perry Smith <pedzsan@gmail.com<mailto:pedzsan@gmail.com>>
Date: Wed, 13 Apr 2011 15:58:47 -0500
To: Edward Young <ed_young@cable.comcast.com<mailto:ed_young@cable.comcast.com>>
Cc: "help-gnu-emacs@gnu.org<mailto:help-gnu-emacs@gnu.org>" <help-gnu-emacs@gnu.org<mailto:help-gnu-emacs@gnu.org>>
Subject: Re: How to make emacs path aware on MacOSX


On Apr 13, 2011, at 7:14 AM, Young, Ed wrote:

Apologies if this is the wrong forum for this. If so please redirect me.

I am running emacs on MacOSX, installed from a DMG file.

It works great, but it is not aware of my path, so I can't execute commands like 'git' or 'svn' etc.

How can I configure it to be aware of my path. I'm using the global path variable file /etc/profile.

The Finder on the Mac (that starts emacs) doesn't look at /etc/profile, etc.  For a particular user, it does look at ~/.MacOSX/environment.plist

Its a "property list" thing that is normal for Mac settings.  You can find it documented more on Mac forums and those kinds of places.

e.g. http://developer.apple.com/library/mac/#qa/qa1067/_index.html

If you are talking about shells started within emacs, thats a different matter.

HTH,
pedz


[-- Attachment #2: Type: text/html, Size: 3838 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make emacs path aware on MacOSX
  2011-04-14  2:17   ` Young, Ed
@ 2011-04-14  9:05     ` Peter Dyballa
  2011-04-14 12:19       ` Young, Ed
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2011-04-14  9:05 UTC (permalink / raw)
  To: Young, Ed; +Cc: help-gnu-emacs@gnu.org


Am 14.04.2011 um 04:17 schrieb Young, Ed:

> I must not have the environment syntax right.


You have to "export" the variables in sh and bash. In csh or tcsh  
setenv does the same.

--
Greetings

   Pete

Let's face it; we don't want a free market economy either.
		– James Farley, president, Coca-Cola Export Corp., 1959




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make emacs path aware on MacOSX
  2011-04-14  9:05     ` Peter Dyballa
@ 2011-04-14 12:19       ` Young, Ed
  2011-04-14 14:18         ` Peter Dyballa
  0 siblings, 1 reply; 8+ messages in thread
From: Young, Ed @ 2011-04-14 12:19 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs@gnu.org

?

Sorry, but that doesn't make any sense to me. If I define a variable in
the environment.plist file, and then log out and back in (that's a pain)
the variables are available.

The problem is when I try to embed a variable in the value of another
variable: 

SW_HOME /opt/comcast/software
GROOVY_HOME $SW_HOME/groovy/current

In the case above, SW_HOME doesn't resolve correctly in the GROOVY_HOME
variable. 

It doesn't seem like exporting is the problem.


On 4/14/11 3:05 AM, "Peter Dyballa" <Peter_Dyballa@Web.DE> wrote:

>
>Am 14.04.2011 um 04:17 schrieb Young, Ed:
>
>> I must not have the environment syntax right.
>
>
>You have to "export" the variables in sh and bash. In csh or tcsh
>setenv does the same.
>
>--
>Greetings
>
>   Pete
>
>Let's face it; we don't want a free market economy either.
>		­ James Farley, president, Coca-Cola Export Corp., 1959
>




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make emacs path aware on MacOSX
  2011-04-14 12:19       ` Young, Ed
@ 2011-04-14 14:18         ` Peter Dyballa
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2011-04-14 14:18 UTC (permalink / raw)
  To: Young, Ed; +Cc: help-gnu-emacs@gnu.org


Am 14.04.2011 um 14:19 schrieb Young, Ed:

> Sorry, but that doesn't make any sense to me. If I define a variable  
> in
> the environment.plist file,

I did not understand completely what you wrote and assumed that you  
were still referring to the usual files a shell interpreter is reading  
when it is started.

> and then log out and back in (that's a pain) the variables are  
> available.

Mac OS X allows to set up some so-called "Startup Items"...

>
> The problem is when I try to embed a variable in the value of another
> variable:
>
> SW_HOME /opt/comcast/software
> GROOVY_HOME $SW_HOME/groovy/current
>
> In the case above, SW_HOME doesn't resolve correctly in the  
> GROOVY_HOME
> variable.

That's indeed not possible inside ~/.MacOSX/environment.plist. It's  
just a simple text, or, better: XML file. Inside it no substitution  
happens. With GNU Emacs or some other editor it's really not that  
complicated to substitute variable names with the contents they stand  
for.

OTOH, a shell should be able resolve a setting like "$SW_HOME/groovy/ 
current" when "$SW_HOME" is given. Proof:

	ls -l $SW_HOME/groovy/current

--
Greetings

   Pete                           <]
              o        __o         |__    o       HPV, the real
     ___o    /I       -\<,         |o \  -\),-%     high speed!
___/\ /\___./ \___...O/ O____.....`-O-'-()--o_________________




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-14 14:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 12:14 How to make emacs path aware on MacOSX Young, Ed
2011-04-13 20:53 ` Edward O'Connor
2011-04-13 20:58 ` Perry Smith
2011-04-13 23:00   ` Peter Dyballa
2011-04-14  2:17   ` Young, Ed
2011-04-14  9:05     ` Peter Dyballa
2011-04-14 12:19       ` Young, Ed
2011-04-14 14:18         ` Peter Dyballa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.