August Feng

Debugging the jka-compr package

About

The jka-compr package allows us to read compressed files as if they were uncompressed. It uses an external tool in the backend, gunzip in the case of MacOS as seen in the source code.

Issue

There seems to be an issue with a locally compiled emacs (29.0) where Spacemacs ignores the jka-compr.elc files, and tries to load the compressed jka-compr.el.gz, which is a circular dependency / bootstrap issue.

This is hinted in a discussion from an unrelated(?) bug report.

Fix

I didn't pinpoint if the preference of *.el.gz was due a behaviour in Spacemacs, instead I just deleted all compressed files in the Emacs.app/Contents/Resources/lisp directory:

  find Emacs.app/Contents/Resources/lisp -name '*.el.gz' -exec rm {} \;

Fix (Updated)

I found out that these compressed lisp files are the original .el. As a result, I'd rather decompress them to recover the .el for debugging instead:

  find Emacs.app/Contents/Resources/lisp -name '*.el.gz' -exec gzip -d {} \;