d12frosted / homebrew-emacs-plus

Emacs Plus formulae for the Homebrew package manager
MIT License
2.37k stars 182 forks source link

Have the option to run emacs as --daemon in brew services #697

Open MuhmdRaouf opened 4 months ago

MuhmdRaouf commented 4 months ago

Feature request description

Hello, I have installed Emacs and enabled brew services as well, then realized that in /opt/homebrew/Cellar/emacs-plus@29/29.4/homebrew.mxcl.emacs-plus@29.plist it work as --fg-daemon can we add a flag while build to give us the ability to make it run as --daemon/--bg-daemon, as after I have change it and restart the service emacs loading became much faster (using doom emacs)

credit to the idea came from this comment in this gist https://gist.github.com/redinger/1394910?permalink_comment_id=5001180#gistcomment-5001180

d12frosted commented 3 months ago

Hey @MuhmdRaouf,

I am not using Emacs as daemon/service. But I am completely open to the idea of making this work out of the box. But someone who cares needs to figure things out and prepare a PR 😸

A few random thoughts:

  1. Would be nice to avoid using any install flags. Installation should support two ways of starting Emacs without reinstalling it.
  2. Brew provides command/capabilities for running services, maybe it can be used.
  3. Would be nice to provide Emacs Client.app out of the box or make Emacs.app act as a client when service is running.

So please, if someone cares about daemon mode - chime in, figure things out and send a PR :)