From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 21423@debbugs.gnu.org
Subject: bug#21423: 24.5; (package-initialize) added to init.el without (setq package-enable-at-startup nil)
Date: Sun, 6 Sep 2015 13:59:22 +0100 [thread overview]
Message-ID: <CAAdUY-LP=WdvPdZM-fKQnP_jh8rLFZUtDM29bCk7A+xLX4FpAg@mail.gmail.com> (raw)
In-Reply-To: <55EC1F21.8080702@orcon.net.nz>
I think I'd rather do the patch below.
This will not only help the situation where we automatically add
`(package-initialize)' to the init file, but it will also help those
users who have manually added it without knowing about this caveat.
Does anyone foresee problems with this?
From 94dafb46f7f258cb19929efc8bb9c123f428bcc5 Mon Sep 17 00:00:00 2001
From: Artur Malabarba <bruce.connor.am@gmail.com>
Date: Sun, 6 Sep 2015 13:52:54 +0100
Subject: [PATCH] * lisp/emacs-lisp/package.el (package-initialize): Set
enable-at-startup
When `package-initialize' is called as part of loading the init file,
the user probably doesn't want it to be called again afterwards. In this
situation, `package-initialize' now sets `package-enable-at-startup' to
nil to prevent that. The user can have the old behaviour by setting this
variable to t after the call to `package-initialize'. (Bug#21423)
---
lisp/emacs-lisp/package.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 7c4f21f..57b35ca 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1378,7 +1378,9 @@ it to the file."
(if (equal user-init-file load-file-name)
;; If `package-initialize' is being called as part of loading
;; the init file, it's obvious we don't need to ensure-init.
- (setq package--init-file-ensured t)
+ (setq package--init-file-ensured t
+ ;; And likely we don't need to run it again after init.
+ package-enable-at-startup nil)
(package--ensure-init-file))
(package-load-all-descriptors)
(package-read-all-archive-contents)
--
2.5.1
next prev parent reply other threads:[~2015-09-06 12:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-06 11:01 bug#21423: 24.5; (package-initialize) added to init.el without (setq package-enable-at-startup nil) Phil Sainty
2015-09-06 11:10 ` Phil Sainty
2015-09-06 12:59 ` Artur Malabarba [this message]
2015-09-06 13:29 ` Phil Sainty
2015-09-06 15:21 ` Artur Malabarba
2015-09-06 22:33 ` Stefan Monnier
2015-09-07 10:26 ` Artur Malabarba
2015-09-06 13:18 ` Phil Sainty
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='CAAdUY-LP=WdvPdZM-fKQnP_jh8rLFZUtDM29bCk7A+xLX4FpAg@mail.gmail.com' \
--to=bruce.connor.am@gmail.com \
--cc=21423@debbugs.gnu.org \
--cc=psainty@orcon.net.nz \
/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.