I start Snow Leopard and try to start Emacs so that when it starts, its output (getenv "PATH")matches output in Terminal.app echo $PATH.
In other words, I want to start Emacs from /Applications/Emacs.appand start with mine $PATH. I could not figure out how to do this in emacs, or with how I start emacs. So I spent most of my efforts trying to come up with a shell script that I can wrap with something like Platypus or Add .
So the closest I have now is:
echo MYPASSWD | sudo -S -u USERNAME -i nohup /Applications/Emacs.app/Contents/MacOS/Emacs > /dev/null &
which fails because nohup seems to throw my $ PATH in spite of the flag -i. The following does not throw mine PATH, but opens up the extra Terminal.app:
echo MYPASSWD | sudo -S -u USERNAME -i open /Applications/Emacs.app/Contents/MacOS/Emacs > /dev/null &
I tried to run this through do shell scriptin AppleScript, also to no avail.
Did I miss something basic? It doesn't seem to be hard. Thank!
source
share