5 ms·
I've been using Emacs overlay to compile packages ahead of time for a while. Unless I've misunderstood how it works, that's what the variations on emacsWithPack
by tikhonj 4y ago
I've been using Emacs overlay to compile packages ahead of time for a while. Unless I've misunderstood how it works, that's what the variations on emacsWithPackages do.
I use the version of emacsWithPackages that parses use-package declarations from my .emacs file and uses Nix to compile and install the corresponding Emacs packages. The upside is that this also pulls in native dependencies (pdf-tools/etc) but the downside is that adding a new package requires rebuilding at the Nix level and restarting Emacs. It has not been a major problem for me—I don't install new Emacs packages very often at this point—but I can definitely see how it could get annoying for anyone who does!
- tadfisher 4y agoWhile not in line with the Lisp philosophy, it's far more hygienic to restart Emacs after a configuration change rather than reloading the init file. There's really no way to bring Emacs back to a pre-init state in order to recreate the initialization process. Not to mention that compiling the init file runs different code than loading the init file, and Lisp expressions are far from idempotent, so you can't really be sure your changes work until you restart Emacs anyway.
- theCodeStig 4y agoThis echos my set up, and it's quite stable, particularly if the overlay is pinned.