Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

emacs can be very slow to start if you install everything and the kitchen sink. I had spacemacs installed with everything for working with elixir and it took maybe 5 or 6 seconds to start. I started over from a blank init.el and I have it much quicker but it doesn't really matter because you just run a daemon and connect to it.


> it doesn't really matter because you just run a daemon and connect to it.

I'm writing this because I think many people are unaware of this feature of Emacs and might gloss over it in your post.

As far as I'm concerned startup time is next to irrelevant in Emacs, since you can start an Emacs server once when you boot up and then just run clients that open and connect instantaneously. That is, you can then run 'emacsclient' from the command line in any terminal you want, and it will open a working Emacs instance in a few milliseconds.

Here's blog post that describes this feature:

https://brainlessdeveloper.com/2017/12/27/making-emacs-work-...

The blog post above actually overstates how difficult it is to start working with Emacs in this way. It's dead easy.


On macOS, I have the following defined in ~/.bashrc:

   alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs -nw"
   alias e="et"
   alias eb="/Applications/Emacs.app/Contents/MacOS/Emacs -nw -Q --eval \"(load-theme 'misterioso)\""
   alias et="emacsclient -t -a ''"
Explanation of the `-a ''` option per `emacsclient --help`:

   -a EDITOR, --alternate-editor=EDITOR
       Editor to fallback to if the server is not running
       If EDITOR is the empty string, start Emacs in daemon
       mode and try connecting again




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

Search: