emacs-starter-kit icon indicating copy to clipboard operation
emacs-starter-kit copied to clipboard

Suggestion: include package-refresh-contents for automated init.el example

Open xpe opened this issue 9 years ago • 0 comments

I suggest expanding your writeup to include this right after package-initialize:

(unless package-archive-contents
  (package-refresh-contents))

Your write-up currently suggests this code:

(defvar my-packages '(better-defaults paredit idle-highlight-mode ido-ubiquitous
                                      find-file-in-project magit smex scpaste))
(package-initialize)
(dolist (p my-packages)
  (when (not (package-installed-p p))
    (package-install p)))

I found it to be incomplete; the package-refresh-contents is required for a brand-new installation, in my experience. I got the code from http://stackoverflow.com/a/10093312/109618

xpe avatar Nov 10 '14 19:11 xpe