all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21423: 24.5; (package-initialize) added to init.el without (setq package-enable-at-startup nil)
@ 2015-09-06 11:01 Phil Sainty
  2015-09-06 11:10 ` Phil Sainty
  0 siblings, 1 reply; 8+ messages in thread
From: Phil Sainty @ 2015-09-06 11:01 UTC (permalink / raw)
  To: 21423

[-- Attachment #1: Type: text/plain, Size: 827 bytes --]

package--ensure-init-file inserts (package-initialize) into the user's
init file, but it does not also insert (setq package-enable-at-startup nil),
which means that (according to (emacs) Package Installation) Emacs will
re-initialize the packages post-init:

 > In some circumstances, you may want to load packages explicitly in
 > your init file (usually because some other code in your init file
 > depends on a package).  In that case, your init file should call the
 > function ‘package-initialize’.  It is up to you to ensure that
 > relevant user options, such as ‘package-load-list’ (see below), are
 > set up prior to the ‘package-initialize’ call.  You should also set
 > ‘package-enable-at-startup’ to ‘nil’, to avoid loading the packages
 > again after processing the init file.



[-- Attachment #2: 0001-Disable-package-enable-at-startup-when-forcing-packa.patch --]
[-- Type: text/x-patch, Size: 978 bytes --]

From 297f2d5555ba0efb0afc3412f49d1c728ebb5700 Mon Sep 17 00:00:00 2001
From: Phil Sainty <phil@orcon.net.nz>
Date: Sun, 6 Sep 2015 22:48:40 +1200
Subject: [PATCH] Disable package-enable-at-startup when forcing
 package-initialize

---
 lisp/emacs-lisp/package.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index d4a2f02..baa4ab6 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1856,6 +1856,7 @@ add a call to it along with some explanatory comments."
                ";; installed packages.  Don't delete this line.  If you don't want it,\n"
                ";; just comment it out by adding a semicolon to the start of the line.\n"
                ";; You may delete these explanatory comments.\n"
+               "(setq package-enable-at-startup nil)\n")
                "(package-initialize)\n")
               (unless (looking-at-p "$")
                 (insert "\n"))
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-07 10:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.