3 ms·
use-package already has a way to defer configuration until it’s needed.
by fiddlerwoaroof 6y ago
use-package already has a way to defer configuration until it’s needed.
- k_bx 6y agoYes, I'm certainly using that, but it's far from being enough to make emacs-with-config a usable replacement for the in-terminal editor.
- fiddlerwoaroof 6y agoIt’s probably not what you want to hear, but I just use emacsclient for that. I agree that the startup time is annoying, though.
- k_bx 6y agoYes, I just use "emacs -nw -q" (aliased as eq) when in terminals, and it's surprisingly good most of the time. But having good startup time always would make a huge difference imho, including Emacs's popularity.
- natrys 6y agoParent is talking about using "emacsclient". Basically you start Emacs in daemon mode (e.g. add "(server-start)" at end of config), and you never kill it. You just pay slow startup cost once, any subsequent client invocation after that is instantaneous.
- k_bx 6y agoI understand. I use it for my git commit editing in my “master” emacs. It’s just not usable when you want multiple instances in different tmux windows
- fiddlerwoaroof 6y agoI have this little handy shell function for that: semacs () { emacs --eval "(setq server-name \"$1\")" --daemon } `semacs foo` then starts an emacs server named foo and and `emacsclient -s foo -c` attaches to it.
- zelly 6y agoI've used use-package to get my startup time from 10-20 seconds to <500 ms. (But to be fair I did trim a lot of useless cruft.)