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

Emacs

305 readers
1 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

top 6 comments
sorted by: hot top controversial new old
[–] mplscorwin@alien.top 1 points 11 months 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/

[–] troll-gpt@alien.top 1 points 11 months ago

What does it mean?

[–] eli-zaretskii@alien.top 1 points 11 months ago (1 children)

Thanks to Andreas

His name is Andrea, not Andreas.

[–] mplscorwin@alien.top 1 points 11 months ago

ugh, tysm; fixed.

[–] eli-zaretskii@alien.top 1 points 11 months ago (1 children)

we can now "redump" Emacs

Hold your horses: there are still bugs in "redumped" Emacs, so it is too early to announce a victory and make it sound like everyone can now use this without fear. It will take some non-trivial development work to clean this up, as there are many problems that need to be found and fixed before this becomes a reliable feature.

[–] mplscorwin@alien.top 1 points 11 months ago

In point of fact, I was well aware of there being edges here --hence being cautious, to start-- so I doubly appreciate your correcting the record.

Re-reading it, I agree it clearly does have too much squee -- I plead the thrill of a "new to me" Emacs feature: something that didn't work for me yesterday does now: namely, dumping after I've natively compiled some things. Heady stuff; I got carried away.

Thank you for providing the clarity I hadn't realized was absent.