Hi Philip,
Many thanks for your work on the setup.el . There seems to be a problem with the :package keyword.
It uses (memq package package-archive-contents) to check whether to call package-refresh-contents. This always returns nil and the contents is refreshed for every package being installed.
I’ve tested it on emacs 29.3:
*** Welcome to IELM *** Type (describe-mode) or press C-h m for help.
ELISP> (package-refresh-contents)
nil
ELISP> (memq 'setup package-archive-contents)
nil
ELISP> (assoc 'setup package-archive-contents)
(setup #s(package-desc :name setup :version
(1 3 2)
:summary "Helpful Configuration Macro" :reqs
((emacs
(26 1)))
:kind tar :archive "gnu" :dir nil :extras
((:url . "https://git.sr.ht/~pkal/setup")
(:keywords "lisp" "local")
(:maintainer "Philip Kaludercic" . "~pkal/public-inbox@lists.sr.ht")
(:authors
("Philip Kaludercic" . "philipk@posteo.net"))
(:commit . "28926bd11eef6118f4e169d10c1c36b8c4e545ae"))
:signed nil))
ELISP> (emacs-version)
"GNU Emacs 29.3 (build 1, aarch64-apple-darwin23.3.0, NS appkit-2487.40 Version 14.3.1 (Build 23D60))"
ELISP>
Looks like the fix is to use assoc instead of memq.
Cheers
Ralf
Ralf Schmitt <ralf@systemexit.de> writes:
> Hi Philip,
>
> Many thanks for your work on the setup.el . There seems to be a problem with the :package keyword.
> It uses (memq package package-archive-contents) to check whether to
> call package-refresh-contents. This always returns nil and the
> contents is refreshed for every package being installed.
>
> I’ve tested it on emacs 29.3:
>
> *** Welcome to IELM *** Type (describe-mode) or press C-h m for help.
> ELISP> (package-refresh-contents)
> nil
> ELISP> (memq 'setup package-archive-contents)
> nil
> ELISP> (assoc 'setup package-archive-contents)
> (setup #s(package-desc :name setup :version
> (1 3 2)
> :summary "Helpful Configuration Macro" :reqs
> ((emacs
> (26 1)))
> :kind tar :archive "gnu" :dir nil :extras
> ((:url . "https://git.sr.ht/~pkal/setup")
> (:keywords "lisp" "local")
> (:maintainer "Philip Kaludercic" . "~pkal/public-inbox@lists.sr.ht")
> (:authors
> ("Philip Kaludercic" . "philipk@posteo.net"))
> (:commit . "28926bd11eef6118f4e169d10c1c36b8c4e545ae"))
> :signed nil))
>
> ELISP> (emacs-version)
> "GNU Emacs 29.3 (build 1, aarch64-apple-darwin23.3.0, NS appkit-2487.40 Version 14.3.1 (Build 23D60))"
> ELISP>
>
>
> Looks like the fix is to use assoc instead of memq.
That certainly makes sense, but I would just use `assq' instead of
`assoc' since it is more specific. I'll push a commit and prepare a
new release of setup.el in the next few days.
Thanks you for noticing and your kind words!
> Cheers
> Ralf
>
--
Philip Kaludercic on peregrine