I'm trying to start an emacs 27.2 daemon on Big Sur with the following plist:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>gnu.emacs.daemon</string>
<key>ProgramArguments</key>
<array>
<string>/Users/me/src/gnu-emacs/27/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs</string>
<string>--bg-daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceDescription</key>
<string>Gnu Emacs Daemon</string>
</dict>
</plist>
The process starts fine and I'm able to access the process. However, the path for the application launched is not the past from .zshrc.
If I start the application from terminal or Finder, the app loads -AND- the path is as expected.
How do I add an environment variable (such as PATH) to a LaunchAgent?