I’ve recently made the switch to using Emacs in Daemon mode.
The primary benefit (for me) is super quick boot up time — and it’s been wonderful, except I ran into the problem today of having a large set of my configuration not working. A bunch of my trusty keybinds were gone, some packages weren’t loaded, and this led to sessions started with
emacsclient -t not feeling quite like home.
Here are a few tips in case you run into issues with init config loading for you:
- Make sure your init file is properly named (generally
~/.emacs.d/emacs.elare looked for on startup (Because the documentation said so)
- Simple attempts at triggering
--debug-initso I devolved to print-statement debugging (the
messageelisp function is your friend). Find out quickly whether your init file is being read at all by putting in some statements, and checking the *Messages* buffer once Emacs has started up.
- If you want your Emacs to start a server in case there isn’t one already running, alias some command (like “emax”) to
emacsclient -t -a ''
- Often, the reasons that later parts of your Emacs init file won’t load are due to faulty requires, and possibly functions that assume there is a default frame (for example, I had a little bit of init code that opened and closed sr-speedbar, and it subtly erroring)
- Remember to
pkill emacsbetween bug fixing iterations