Last active
December 13, 2019 19:29
-
-
Save gonewest818/50169a11d5c88b7343f51da8ae69c145 to your computer and use it in GitHub Desktop.
MacOS: configure launchd to run `emacs --fg-daemon` at login
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!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>org.gnu.emacs-daemon</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/emacs</string> | |
<string>--fg-daemon</string> | |
</array> | |
<key>LSUIElement</key> | |
<true/> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>ServiceDescription</key> | |
<string>Gnu Emacs Daemon</string> | |
<key>StandardErrorPath</key> | |
<string>{HOME}/Library/logs/emacs-daemon-stderr.log</string> | |
<key>StandardOutPath</key> | |
<string>{HOME}/Library/logs/emacs-daemon-stdout.log</string> | |
</dict> | |
</plist> |
Caveats:
- the
LSUIElement
boolean seems to toggle off the dock icon until the first time you actually open a frame. After that, you're stuck with a dock icon even once the client frame is closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install:
/usr/local/bin/emacs
... change if needed{HOME}
with the full path to your home directory{HOME}/Library/LaunchAgents/org.gnu.emacs-daemon.plist