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: Sat, 2 Nov 2019 05:57:58 +0100 [thread overview]
Message-ID: <CADwFkmniR7fbYcNmiC_2irNBfnRyvasN_RUfcP1iJkg8JYdbcg@mail.gmail.com> (raw)
In-Reply-To: <jwvtv7zljci.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> > 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?
>
> I guess it can still be effective if you load your custom-file from
> early-init.el, but indeed it's rather unlikely to be effective in
> Emacs≥27.
My guess would be that this will continue to be an unusual setup.
> > 2. It is a user option, but gets set automatically by
> > package-initialize. This makes it a bit confusing, because
> > describe-variable says:
>
> Indeed, and this problem already existed before.
>
> > Would this be better as a defvar instead?
>
> I think you're right.
I started looking into package-enabe-at-startup, and of course the
above reasoning goes for package-load-list and package-user-dir; that
is, setting them via customize has no effect. I see two alternatives:
1. Make sure that you can set all three via customize.
2. Make all three into defvars.
I'm not sure if option 1 is either practical or clean, so I'd lean
towards option 2, I think. I'd be interested to hear what other
people think about it.
Meanwhile, the attached patch makes us not change the value of
package-enable-at-startup by introducing a new variable. Any
comments?
Best regards,
Stefan Kangas
[-- Attachment #2: package-init.diff --]
[-- Type: text/x-patch, Size: 2595 bytes --]
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi
index 236855bdf8..a8a136f187 100644
--- a/doc/lispref/package.texi
+++ b/doc/lispref/package.texi
@@ -109,7 +109,7 @@ Packaging Basics
@code{package-activate-all} to make installed packages available to the
current session. This is done after loading the early init file, but
before loading the regular init file (@pxref{Startup Summary}).
-Packages are not automatically made available if the user option
+Packages are not automatically made available if the variable
@code{package-enable-at-startup} is set to @code{nil} in the early
init file.
diff --git a/etc/NEWS b/etc/NEWS
index 033cb48978..fa681f3f47 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -191,6 +191,9 @@ it won't work right without some adjustment:
does not need to pay attention to 'package-load-list' or
'package-user-dir' any more.
+The value of 'package-enable-at-startup' can no longer be changed
+using customize.
+
---
** Emacs now notifies systemd when startup finishes or shutdown begins.
Units that are ordered after 'emacs.service' will only be started
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 539b236b63..2885b2c194 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -162,20 +162,23 @@ package
;;; Customization options
;;;###autoload
-(defcustom package-enable-at-startup t
+(defvar package-enable-at-startup t
"Whether to make installed packages available when Emacs starts.
If non-nil, packages are made available before reading the init
file (but after reading the early init file). This means that if
-you wish to set this variable, you must do so in the early init
-file. Regardless of the value of this variable, packages are not
-made available if `user-init-file' is nil (e.g. Emacs was started
-with \"-q\").
+you wish to set this variable to nil, you must do that in the
+early init file. See Info node `(emacs) Early Init File'.
+
+Note that the package system will automatically set this variable
+to nil when the package system is initialized.
+
+Regardless of the value of this variable, packages are not made
+available if `user-init-file' is nil (e.g. Emacs was started with
+\"-q\").
Even if the value is nil, you can type \\[package-initialize] to
make installed packages available at any time, or you can
-call (package-initialize) in your init-file."
- :type 'boolean
- :version "24.1")
+call (package-initialize) in your init-file.")
(defcustom package-load-list '(all)
"List of packages for `package-initialize' to make available.
next prev parent reply other threads:[~2019-11-02 4:57 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
2019-10-23 12:49 ` Stefan Monnier
2019-11-02 4:57 ` Stefan Kangas [this message]
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=CADwFkmniR7fbYcNmiC_2irNBfnRyvasN_RUfcP1iJkg8JYdbcg@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.