jaremacsarchive

When opening an archive in Emacs, it's empty by default, needs pressing g to refresh


When I open a jar file in Emacs, it opens a buffer with an empty table:

M  ...   Filename
- ----- ---------------
- ----- ---------------

If I press g, it gets reread and I see the actual ToC of the archive:

M    Mode     Size        Date&time         Filename
- ----------  -----  --------------------  ----------------
  -rw-rw-rw-    121  14-Feb-2018 16:36:20  META-INF/MANIFEST.MF
  -rw-rw-rw-   2026  14-Feb-2018 16:36:20  META-INF/maven/aero/aero/pom.xml
  -rw-rw-rw-    440  14-Feb-2018 16:36:20  META-INF/leiningen/aero/aero/project.clj
  -rw-rw-rw-  14152  14-Feb-2018 16:36:20  META-INF/leiningen/aero/aero/README.md
  -rw-rw-rw-   1075  14-Feb-2018 16:36:20  META-INF/leiningen/aero/aero/LICENSE

This weird behavior (forcing me to press g) ruins some pipelines, e.g. opening a source file that is located in a Jar archive. Everything has been fine so far, and I didn't notice how I broke this. I don't remember altering some settings related to archives.

PS: GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2022-05-11


Solution

  • The culprit was that line in my config:

    (setq-default coding-system-for-read 'utf-8)
    

    Once I've commented it out, the weird behavior has gone.