this post was submitted on 25 Oct 2023
3 points (100.0% liked)

Emacs

311 readers
3 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago

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/