GNU bug report logs - #76264
[GNU ELPA] Use lisp-data-mode in generated *-pkg.el files

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Thu, 13 Feb 2025 12:25:01 UTC

Severity: wishlist

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Basil L. Contovounesios" <basil <at> contovou.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Philip Kaludercic <philipk <at> posteo.net>, Stefan Kangas <stefankangas <at> gmail.com>, 76264 <at> debbugs.gnu.org
Subject: bug#76264: [GNU ELPA] Use lisp-data-mode in generated *-pkg.el files
Date: Wed, 19 Mar 2025 22:32:41 +0100
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:

    (error
     ;; Probably unbalanced parens in forward-sexp. In that case, the
     ;; condition is scan-error, and the signal data includes point
     ;; where the error was found; we'd like to convert that to
     ;; line:col, but line-number-at-pos gets the wrong line in batch
     ;; mode for some reason.
     ;;
     ;; At least this gets the file name in the error message; the
     ;; developer can use goto-char to get to the error position.
     (error "%s:0:0: error: %s: %s" file (car err) (cdr err)))

The example in the OP (installing dash from GNU ELPA) isn't so bad:
the user sees a scary error message, but after restarting Emacs dash
can be loaded without issue.

It can be worse, though:

0. cd "$(mktemp -d)"
1. HOME="$PWD" XDG_CONFIG_HOME="$PWD" emacs-27.2
2. M-: (setq package-check-signature nil) RET
3. M-: (setq package-archives '(("gnu" . "https://elpa.gnu.org/devel/"))) RET
4. M-x package-install RET hydra RET

This barfs while handling hydra's lv dependency, so hydra itself is
never installed.

-- 
Basil




This bug report was last modified 59 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.