From: Corwin Brust <corwin@bru.st>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: Philip Kaludercic <philipk@posteo.net>,
Lars Ingebrigtsen <larsi@gnus.org>,
53885@debbugs.gnu.org
Subject: bug#53885: Autoload package-installed-p
Date: Thu, 10 Feb 2022 03:23:19 -0600 [thread overview]
Message-ID: <CAJf-WoRqz5A7T4AzObhZ9u-g+o6-rUXZPKUWqATC-b5tp-p_Xg@mail.gmail.com> (raw)
In-Reply-To: <87y22jm7su.fsf@gmail.com>
On Thu, Feb 10, 2022 at 3:06 AM Augusto Stoffel <arstoffel@gmail.com> wrote:
>
> On Wed, 9 Feb 2022 at 09:39, Corwin Brust <corwin@bru.st> wrote:
>
> > On Wed, Feb 9, 2022, 08:39 Augusto Stoffel <arstoffel@gmail.com> wrote:
> >
> > By the way, there are two issues with this code snippet. First, you
> > should call '(package-refresh-contents)' to make sure you have the
> > package list from MELPA.
> >
> > I believe this was changed with the implementation of "early-init". We don't need to expressly call
> > `package-refresh-contents' since Emacs 27, see:
> > https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.27#L227
>
> This is a different matter. What I was saying is, you need to download
> the package list from MELPA before trying to install a missing package.
This is taken care of by a call to package-installed-p in the case
where it does not receive a package description as the first argument
and when no min-version is passed, as in my "reproducer". Or maybe I
still don't understand.
> 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.
>
> 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.
next prev parent reply other threads:[~2022-02-10 9:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 23:55 bug#53885: Autoload package-installed-p Corwin Brust
2022-02-09 0:05 ` bug#53885: 28.0.51 [PATCH] " Corwin Brust
2022-02-09 13:37 ` Eli Zaretskii
2022-02-09 20:16 ` Lars Ingebrigtsen
2022-02-09 23:58 ` Corwin Brust
2022-02-10 6:10 ` Eli Zaretskii
2022-02-10 6:45 ` Lars Ingebrigtsen
2022-02-10 7:21 ` Corwin Brust
2022-02-10 7:57 ` Eli Zaretskii
2022-02-10 8:09 ` Corwin Brust
2022-02-10 8:18 ` Eli Zaretskii
2022-02-10 8:41 ` Lars Ingebrigtsen
2022-02-10 8:49 ` Corwin Brust
2022-02-10 12:04 ` Eli Zaretskii
2022-02-10 14:54 ` Corwin Brust
2022-02-10 17:29 ` Eli Zaretskii
2022-02-09 5:39 ` bug#53885: " Corwin Brust
2022-02-09 14:39 ` Augusto Stoffel
2022-02-09 15:39 ` Corwin Brust
2022-02-10 8:42 ` Augusto Stoffel
2022-02-10 8:59 ` Philip Kaludercic
2022-02-10 9:28 ` Augusto Stoffel
2022-02-10 9:23 ` Corwin Brust [this message]
2022-02-10 9:30 ` Augusto Stoffel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJf-WoRqz5A7T4AzObhZ9u-g+o6-rUXZPKUWqATC-b5tp-p_Xg@mail.gmail.com \
--to=corwin@bru.st \
--cc=53885@debbugs.gnu.org \
--cc=arstoffel@gmail.com \
--cc=larsi@gnus.org \
--cc=philipk@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.