Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MuhmdRaouf opened this issue Jul 4, 2024 · 4 comments
Open

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

MuhmdRaouf opened this issue Jul 4, 2024 · 4 comments
Labels
feature request help needed This feature/issue is unlikely to be addressed by maintainers. So PR is needed.

Comments

@MuhmdRaouf
Copy link

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/[email protected] 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
Copy link
Owner

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 :)

@d12frosted d12frosted added feature request help needed This feature/issue is unlikely to be addressed by maintainers. So PR is needed. labels Aug 25, 2024
@d12frosted
Copy link
Owner

@MuhmdRaouf can you explain me why you need bg specifically? fg works and to my understanding, it is required if we want to stop the server whenever we stop the service.

In any case, I hope client users would find this useful - #783

@MuhmdRaouf
Copy link
Author

@d12frosted tbh I am new to Emacs and still learning, so what I wanted might work without the need for fg/bg

I wanted to run Emacs as a server (that's why I said bg) and connect to it via client, which will help me to avoid accidental close, or just close emacs client for now, but I wanna get back to the same point I left, and faster loading after the first time.

let me know if what make sense and what I asked for is reasonable

@d12frosted
Copy link
Owner

So it always worked :)

Just run brew services start emacs-plus@30 and then you can use emacsclient. Just make sure you are not using TCP (i.e. server-use-tcp is nil and EMACS_SERVER_FILE env var is not set).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help needed This feature/issue is unlikely to be addressed by maintainers. So PR is needed.
Projects
None yet
Development

No branches or pull requests

2 participants