GNU bug report logs - #72160
29.3; package buglet

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>

Date: Wed, 17 Jul 2024 16:18:02 UTC

Severity: normal

Found in version 29.3

Fixed in version 31.1

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

Bug is archived. No further changes may be made.

Full log


Message #28 received at 72160-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>
Cc: 72160-done <at> debbugs.gnu.org
Subject: Re: bug#72160: 29.3; package buglet
Date: Sat, 1 Mar 2025 19:22:05 -0800
Version: 31.1

Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net> writes:

> Strings and symbols should be equally acceptable package designators.
>
> (use-package 'xr) ; (wrong-type-argument symbolp 'xr)
> Should work like (use-package "xr")

I can see an argument in favor of more DWIM here, because this is
supposed to be a _help_ for configuring Emacs.  Why not make it as
helpful as possible?

On the other hand, probably a better error message is all that is
needed, and it will help keep things consistent and less confusing
across examples and documentation in the wild.

So I have made this have a better error on master (commit 38782e684bf),
and similarly when using a quoted symbol:

String where there should be a symbol.  Hint: say this instead:
‘(use-package foo ...)’

> (package-install "xr") ; (error "Package ‘xr’ is unavailable")
> Should work like (package-install 'xr)
> instead of erring with that awfully misleading error message.

I was considering just improving the error message, however
`package-upgrade` already accepts either a symbol or a string.

So I changed this function to accept a string also, to be more
consistent (commit 735eace97b8).

With that, I'm closing this bug report.




This bug report was last modified 77 days ago.

Previous Next


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