From: Stefan Kangas <stefankangas@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] master 4449301: * etc/NEWS: Improve documentation of 'package-initialize'.
Date: Wed, 23 Oct 2019 14:12:11 +0200 [thread overview]
Message-ID: <CADwFkmn5cPgb8uNvRTuTCiZ3kcUA+T96M0K7BFRVkLBqVPeb1w@mail.gmail.com> (raw)
In-Reply-To: <jwvk18xnf36.fsf-monnier+emacs@gnu.org>
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > +(when (version< emacs-version "27.1")
> > + (package-initialize))
>
> That doesn't do the right thing with the current `master` (nor will it
> with Emacs-27.1's pretest).
Good point, thanks.
> Maybe a better option is
>
> (when package-enable-at-startup
> (package-initialize))
Yes, that would work. But I'm not sure I understand this variable in general.
It is a defcustom (a user option), but:
1. It's ineffective when set from the custom interface, since it has
to be in the early init file. Right?
2. It is a user option, but gets set automatically by
package-initialize. This makes it a bit confusing, because
describe-variable says:
package-enable-at-startup is a variable defined in ‘package.el’.
Its value is nil
Original value was t
I initially thought this meant *I* had changed it for some reason,
because that's usually what it means when Emacs reports that it has
changed, and then I was confused when I couldn't find out where. Only
after a while did I understand that this is a user option that doubles
as a variable that tracks if the package system was initialized or
not.
Would this be better as a defvar instead? Or should we introduce a
new variable to mean that we are already initialized? I don't mean to
rehash old discussions here, so feel free to refer me to earlier
discussions if you've already had them.
> or
>
> (unless package-activated-list
> (package-initialize))
That could also work. Do we prefer not to do this by version? For
example, my suggestion would probably have been:
(unless (< emacs-major-version 27)
(package-initialize))
Best regards,
Stefan Kangas
next prev parent reply other threads:[~2019-10-23 12:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191022021600.2389.91268@vcs0.savannah.gnu.org>
[not found] ` <20191022021602.B41B3209DE@vcs0.savannah.gnu.org>
2019-10-22 12:28 ` [Emacs-diffs] master 4449301: * etc/NEWS: Improve documentation of 'package-initialize' Stefan Monnier
2019-10-23 12:12 ` Stefan Kangas [this message]
2019-10-23 12:49 ` Stefan Monnier
2019-11-02 4:57 ` Stefan Kangas
2019-11-04 17:53 ` Stefan Monnier
2019-11-11 16:07 ` Stefan Kangas
2019-11-12 15:50 ` Stefan Monnier
2019-11-18 14:58 ` Stefan Kangas
2019-11-14 11:16 ` Eli Zaretskii
2019-11-18 15:05 ` Stefan Kangas
2019-11-02 3:34 ` Stefan Kangas
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=CADwFkmn5cPgb8uNvRTuTCiZ3kcUA+T96M0K7BFRVkLBqVPeb1w@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.