From 04803253d7792b6cb946d8daf09e56c0c6a12016 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Fri, 1 Jan 2021 00:00:34 +0000 Subject: [PATCH] Fetch package archives only when they are not cached locally --- config.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config.org b/config.org index 88ffc86..d2bc2e2 100644 --- a/config.org +++ b/config.org @@ -21,13 +21,20 @@ (package-initialize) #+end_src + We also need to fetch the package archives from ELPA and MELPA, + unless they have already been fetched: + + #+begin_src emacs-lisp + (unless package-archive-contents + (package-refresh-contents)) + #+end_src + ** =use-package= The rest of this config grabs packages via =use-package=, so that needs to be installed: #+begin_src emacs-lisp (when (not (package-installed-p 'use-package)) - (package-refresh-contents) (package-install 'use-package)) #+end_src