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: Augusto Stoffel <arstoffel <at> gmail.com>
To: Corwin Brust <corwin <at> bru.st>
Cc: Philip Kaludercic <philipk <at> posteo.net>, Lars Ingebrigtsen <larsi <at> gnus.org>, 53885 <at> debbugs.gnu.org
Subject: bug#53885: Autoload package-installed-p
Date: Thu, 10 Feb 2022 10:30:47 +0100
On Thu, 10 Feb 2022 at 03:23, Corwin Brust <corwin <at> bru.st> wrote:

>> If you delete ~/.emacs.d/elpa, your configuration as you showed it won't
>> be able to bootstrap.
>
> I don't think I called for deleting anything; I just set-up a
> non-standard place for the installation of packages.  But I suspect
> I'm missing your point.

I thought your goal was to have Emacs download all the packages you need
if you copy your configuration files to a new computer.  Maybe I
misunderstood.

>> Autoloading 'package-installed-p' wouldn't cause any harm, but it also
>> doesn't solve any problems, so why bother?
>
> Here I don't agree.  Consider:
>
> (when (not (package-installed-p 'foo))
>   (package-install-package 'foo))
>
> This seems to DTRT; the package does get installed whereas in the
> present world a backtrace is triggered unless we first take care to
> load package.el.

The first time you start Emacs, it doesn't have a list of packages from
ELPA et al (and even if you do, it may be out of date), so
'package-install-pakcage' will fail.




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

Previous Next


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