Subject: Re: bug#76264: [GNU ELPA] Use lisp-data-mode in generated *-pkg.el files

From: Stefan Kangas <[email-masked]>
Date: Wed, 19 Mar 2025 14:52:44 -0700

"Basil L. Contovounesios" <[email-masked]> writes:

> Stefan Monnier [2025-03-19 11:00 -0400] wrote:
>
>>> Here I see more than just a warning, in Emacs versions 24 through 27:
>>>
>>> 0. cd "$(mktemp -d)"
>>> 1. HOME="$PWD" XDG_CONFIG_HOME="$PWD" emacs-27.2
>>> 2. M-: (setq package-check-signature nil) RET
>>> 3. M-x toggle-debug-on-error RET
>>> 4. M-x package-install RET dash RET
>>>
>>> I attach backtraces from Emacs 24.5 and 27.2.
>>
>> Does it signal an error if you don't enable `toggle-debug-on-error`, or
>> do we get a backtrace because of a `with-demoted-error` or some such?
>
> AFAICT it's a real error, in the case of Emacs 27.2 (re)signalled from a
> condition-case handler at the end of autoload-generate-file-autoloads:

Maybe the patch should just be reverted, then?

Just to add some details:

See this issue in use-package, its recent comment, and linked issues for
more people that are affected:
https://github.com/jwiegley/use-package/issues/1083

What I don't understand is why the OP saw a similar error already in
September 2024.  Is there something else going on here as well?
Unfortunately, there is no backtrace, so it's hard to tell, but maybe
someone else will be able to eyeball it.