One of the things I really like about Linux is the ease of doing certain things. But, “ease” is subjective, someone who has been working with MacOS would probably feel the same way if they made the switch to Linux. It could also just be because of my long association with Linux based systems that has provided me with a level of comfort which I haven’t found with MacOS.
I usually have different daemons to separate out the work, context and files based on the projects. For instance I have a daemon for personal and work so as to not mix the buffers and the agenda files.
Opening the graphical emacsclient from terminal was as simple as emacsclient -s <daemon-name> -c. I know what you are thinking: that isn’t simple! But I have an alias setup for that command ec.
However, since moving to macos that command doesn’t work. And up until now, I never really bothered to fix that situation 1.
As I am starting to accept myself to be a MacOS(Apple) user - it was time I invested time in porting some of the workflows that I enjoyed and had in Linux land.
First off, the systemd/runit -> launchctl change. Creating a daemon with launchctl was fairly an eay process.
~/Library/LaunchAgents/emacs_work.plist
<plist version="1.0">
<dict>
<key>Label</key>
<string>emacs_work</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/opt/emacs-plus@31/bin/emacs</string>
<string>--fg-daemon=work</string>
<!--<string>--init-directory=~/.config/emacs/emacs_work</string>-->
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/emacs_work.stdout.log</string>
<key>StandardErrorPath</key>
<string>/tmp/emacs_work.stderr.log</string>
</dict>
</plist>
My attempts to get emacsclient to connect to the daemon socket has failed so far, despite poring through various articles on the interweb.
I never really embraced Macos fully, and a part of me is always ready to jump back to linux.↩︎