GNU bug report logs - #53885
Autoload package-installed-p

Previous Next

Package: emacs;

Reported by: Corwin Brust <corwin <at> bru.st>

Date: Tue, 8 Feb 2022 23:56:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Corwin Brust <corwin <at> bru.st>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 53885 <at> debbugs.gnu.org
Subject: bug#53885: 28.0.51 [PATCH] Autoload package-installed-p
Date: Thu, 10 Feb 2022 01:21:59 -0600
On Thu, Feb 10, 2022 at 12:45 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Thanks, but I don't think I understand the relevance, probably because
> > I don't use use-package.  Why do you need package-installed-p to be
> > autoloaded in this scenario, and why cannot use-package do that by
> > itself?
>
> Yes, that's the puzzling thing.  But I've never used use-package
> myself -- I assumed that it was a framework built around package.el, but
> perhaps it's not related to package.el at all?
>

I'm sure I follow the logic here.  If use-package isn't installed, how
does it matter what relationship it may have to package.el?

That said, one can replace `use-package' with any feature not present
in Emacs as shipped.

Perhaps the use-case is more generally expressed as such:

I would like to have my init scripts automatically install a package
that isn't available "out of the box", but only if that feature hasn't
already been installed.

As things presently stand, `package-installed-p' is nearly perfect for
this, however one must take care to ensure package.el has been
manually loaded before calling it, in order to avoid Emacs raising the
error shown in the original report.




This bug report was last modified 3 years and 162 days ago.

Previous Next


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