Thanks to Andreas (the original author of gccmacs), we can now “redump” Emacs even with some natively compiled elisp in the mix. I’ve been cautious in my experiments so far, but: this works on Windows!
From a MSYS2/MINGW64 bash shell:
bin/emacs --batch -Q -eval '(let ((custom-theme-load-path (list "/.emacs.d/elpa/cyberpunk-2019-theme-20191008.1133/"))) (require '"'"'erc) (load-theme '"'"'cyberpunk-2019 t) (enable-theme '"'"'cyberpunk-2019) (dump-emacs-portable "erc.pdmp"))'
bin/runemacs.exe --dump-file erc.pdmp -fs -l
This seems to get a “fullboth” frame with my theme pretty fast. Note, I can’t trigger connection quite yet at that point; the runemacs
call is loading my full init, and some parts that take a further moment.
Also, the first command, which created the custom portable dump called “erc.pdump” loaded by the second command, was nearly instant. Here’s a look at what this did to size of the the pdmp file.
-rw-r--r-- 2 corwi corwi 16200096 Oct 24 18:10 src/emacs.pdmp
-rw-r--r-- 2 corwi corwi 16200096 Oct 24 18:10 src/emacs-30.0.50.3.pdmp
-rw-r--r-- 1 corwi corwi 16200096 Oct 24 18:10 src/bootstrap-emacs.pdmp
-rw-r--r-- 1 corwi corwi 16506656 Oct 24 18:35 +cl-lib.pdmp
-rw-r--r-- 1 corwi corwi 20006368 Oct 25 00:30 erc+cl-lib.pdmp
-rw-r--r-- 1 corwi corwi 19764904 Oct 25 00:43 erc.pdmp
Since the post might be striking some as cryptic, here’s more general information on what the portable dumper is, how it relates to (building) Emacs, and why you might care.
manual: https://www.gnu.org/software/emacs/manual/html_node/elisp/Building-Emacs.html
wiki: https://www.emacswiki.org/emacs/DumpingEmacs
sub: https://www.reddit.com/r/emacs/comments/eqhvt7/use_portable_dumper_in_your_init/