[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53885: Autoload package-installed-p
From: |
Augusto Stoffel |
Subject: |
bug#53885: Autoload package-installed-p |
Date: |
Thu, 10 Feb 2022 10:30:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
On Thu, 10 Feb 2022 at 03:23, Corwin Brust <corwin@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.
- bug#53885: 28.0.51 [PATCH] Autoload package-installed-p, (continued)
bug#53885: Autoload package-installed-p, Corwin Brust, 2022/02/09