doomemacs/bin
Henrik Lissner 498966179f
perf(cli): doom: reduce init time
Even `emacs --batch -f kill-emacs` can take a non-trivial amount of time
to start up (0.661s on my system). This makes the two `emacs` calls in
bin/doom's shebang amount to >1s of startup time for Doom scripts (~1.5s
on my system). This change removes the second call (or at least defers
it until the after-script; at least, if $TMPDIR or $TEMP aren't set),
bringing down that time to a more bearable 0.9s.

This sacrifices the more descriptive "Can't find Emacs in your $PATH"
error message should the user set their own $EMACS, but the alternative
bash error is good enough:

  $ EMACS=foo doom version
  /home/$USER/.config/emacs/bin/doom: line 12: foo: command not found

I'm not doing more sophisticated checks on $EMACS, because it could be a
command (like `flatpak run org.gnu.emacs`), rather than an executable or
path, and the boilerplate to handle that, within what small space we get
in bin/doom's shebang, would be too much maintenance headache just for a
slightly better error message.
2024-09-10 00:06:03 -04:00
..
doom perf(cli): doom: reduce init time 2024-09-10 00:06:03 -04:00
doom.ps1 fix(cli): doom.ps1: path to post-script 2024-09-07 02:51:12 -04:00
doomscript feat(cli): add doom.ps1 for Windows users 2024-09-07 01:05:57 -04:00
org-capture fix(cli): "Unknown terminal type" error on bin/org-capture 2021-11-24 22:03:21 +01:00