From e584d92941b3af37ef65432b292db62f48df1ee9 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 22 Jun 2019 16:26:02 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=98list-packages=E2=80=99=20forgett?= =?UTF-8?q?ing=20about=20archive=20contents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oni-package.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/oni-package.el b/oni-package.el index 6efd62c..f47147a 100644 --- a/oni-package.el +++ b/oni-package.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 20190314002658 +;; Version: 20190622162418 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -36,6 +36,18 @@ (require 'package) (require 'package-x) +;;;; If I let Emacs decide when to run ‘package-initialize’ it seems to do it +;;;; before adding my archives to the ‘package-archives’ variable. By disabling +;;;; the automatic call at startup and telling it to run it only on +;;;; ‘after-init-hook’ it’ll take my added package archives into account and I +;;;; can once again properly see what new packages have been added when I +;;;; refresh the package list. + +;;;###autoload +(setq package-enable-at-startup nil) + +;;;###autoload (add-hook 'after-init-hook 'package-initialize) + ;;;###autoload (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))