GNU bug report logs - #59941
use-package-defaults type not updated for added keywords :pin, :ensure etc

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Date: Sat, 10 Dec 2022 10:42:01 UTC

Severity: normal

Done: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59941 in the body.
You can then email your comments to 59941 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#59941; Package emacs. (Sat, 10 Dec 2022 10:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mattias Engdegård <mattias.engdegard <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 10 Dec 2022 10:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Emacs Bug Report <bug-gnu-emacs <at> gnu.org>
Cc: John Wiegley <johnw <at> newartisans.com>,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: use-package-defaults type not updated for added keywords :pin,
 :ensure etc
Date: Sat, 10 Dec 2022 11:41:42 +0100
The type of `use-package-defaults` does not include the keywords :pin and :ensure, since these are added to `use-package-keywords` after the declaration of the former.

As a consequence these keywords cannot occur in `use-package-defaults` when using the interactive customisation interface, and since they are present in the default value, the `test-custom-opts` test fails with a type mismatch:

variable: use-package-defaults
   value: ((:config '(t) t) (:init nil t) (:catch t (lambda (name args) (not use-package-expand-minimally))) (:defer use-package-always-defer (lambda (name args) (and use-package-always-defer (not (plist-member args :defer)) (not (plist-member args :demand))))) (:demand use-package-always-demand (lambda (name args) (and use-package-always-demand (not (plist-member args :defer)) (not (plist-member args :demand))))) (:ensure (list use-package-always-ensure) (lambda (name args) (and use-package-always-ensure (not (plist-member args :load-path))))) (:pin use-package-always-pin use-package-always-pin))
    type: (repeat (list (choice :tag "Keyword" (const :disabled) (const :load-path) (const :requires) (const :defines) (const :functions) (const :preface) (const :if) (const :when) (const :unless) (const :no-require) (const :catch) (const :after) (const :custom) (const :custom-face) (const :bind) (const :bind*) (const :bind-keymap) (const :bind-keymap*) (const :interpreter) (const :mode) (const :magic) (const :magic-fallback) (const :hook) (const :commands) (const :autoload) (const :init) (const :defer) (const :demand) (const :load) (const :config)) (choice :tag "Default value" sexp function) (choice :tag "Enable if non-nil" sexp function)))

There are various ways to fix this. Easiest is probably to cease pretending that :pin and :ensure are somehow special and just include them in `use-package-keywords` from the start instead of adding them afterwards.

Alternatives include making the defcustom type less specific and allow any keyword, or modifying that type after adding keywords (a bit messy).





Reply sent to Mattias Engdegård <mattias.engdegard <at> gmail.com>:
You have taken responsibility. (Sun, 11 Dec 2022 16:11:01 GMT) Full text and rfc822 format available.

Notification sent to Mattias Engdegård <mattias.engdegard <at> gmail.com>:
bug acknowledged by developer. (Sun, 11 Dec 2022 16:11:02 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: 59941-done <at> debbugs.gnu.org
Cc: John Wiegley <johnw <at> newartisans.com>,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: use-package-defaults type not updated for added keywords :pin,
 :ensure etc
Date: Sun, 11 Dec 2022 17:10:47 +0100
A simple fix has been pushed to emacs-29 (4893a15631) -- closing.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 09 Jan 2023 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 223 days ago.

Previous Next


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