help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jar files won't open in emacs 27.1 on debian 11.6 "bullseye"


From: Steinar Bang
Subject: Re: jar files won't open in emacs 27.1 on debian 11.6 "bullseye"
Date: Mon, 03 Apr 2023 08:35:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

>>>>> Steinar Bang <sb@dod.no>:
>>>>> Eli Zaretskii <eliz@gnu.org>:
>>> From: Steinar Bang <sb@dod.no>

>>> >>>>> Eli Zaretskii <eliz@gnu.org>:
>>> 
>>> > You need to "M-x load-file RET arc-mode.el.gz RET" before "C-u M-x" of
>>> > the function.  The Emacs will stop in the function.
>>> 
>>> Ok, archive-zip-summarize looks for the magic sequence "PK\005\006" or
>>> "PK\006\007" or "PK\006\006" or "PK\001\002".
>>> 
>>> But what this jar file starts with, is "PK^c^d", which I think is
>>> "PK\003\004", which is non of the above.
>>> 
>>> I.e. archive-zip-summarize doesn't recognize the magic number of these
>>> jar files.

>> Please report this as a bug and include such a jar file.

> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62630

This was not a bug in GNU Emacs.  This was a problem in my config.

I determined this by first running "emacs -Q" and when that opened the
offending .jar file without problems, I tried "emacs -q".

Since "emacs -q" also opened the .jar file without problems, I started
bisecting my ~/.emacs file.

The offending config was the following in my ~/.emacs:

;; editorconfig formatting support
;;;================================
(when (locate-library "editorconfig")
  (editorconfig-mode 1))

editorconfig is a minor mode that makes emacs respect formatting
settings found in .editorconfig files at the top of projects, making
emacs respect the same formatting settings as e.g. IntelliJ IDEA and
Eclipse.
 https://github.com/editorconfig/editorconfig-emacs

And all of the projects that contains .jar files that have failed to
open correctly have .editorconfig files on the top.

Removing the .editorconfig file on the top of the project with the
failing jar files removed the problem.

I bisected the .editorconfig file and found that the offending line was: 
https://github.com/steinarb/modelstore/blob/master/.editorconfig#L7

I.e:
charset = utf-8

I will look into the .editorconfig settings to see if there is a way to
exclude .jar files and/or the target directories from what editorconfig
affects, and if there isn't, open an issue on editorconfig-emacs.

Thanks!


- Steinar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]