Hacker News new | past | comments | ask | show | jobs | submit login

The best way to run emacs IMO is to use "emacs --daemon" to spawn a single daemon process, and then connect to it using emacsclient. Then, startup time is instant!



then you have to maintain/monitor that daemon, seems like too much work.


I use the GNU Shepherd init system as an unprivileged user to manage my emacs daemon, and other things like gpg-agent.

The real benefit of 'emacs --daemon', for me, isn't the faster client startup time, but the unification of the many programs that may spawn $EDITOR. Rather than each one spawning a new Emacs process, these programs spawn a client in the window I already have open where I can access everything else I was working on. On top of that, I use the ItsAllText extension for Firefox to edit text fields inside of that same Emacs instance, too. Very convenient.


The first line of my ~/.emacs is (start-server). /usr/bin/emacs is launched once and runs forever. I spend nearly all my time in emacs, so there is nothing to maintain/monitor. If emacs dies, it is rather obvious.


Personally I just always start emacs with `emacsclient -c -a=`. If no emacs daemon is running, it starts a new one and connects to it.


I meant (server-start). Doh!


> then you have to maintain/monitor that daemon, seems like too much work.

This thread over at reddit may kill your concerns :)

https://www.reddit.com/r/emacs/comments/45mtdz/can_someone_e...


If only someone made something that could monitor daemons and make sure they stay running...


If your system is using systemd, you can create a service file that does that under --user. I manage some user daemons that way.


then you have maintain that thing that monitors the daemons.


What? You literally just call emacs --daemon on startup. You can also easily kill it and restart it.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: