I'm trying to have all of my dependencies install automatically for a new Emacs install. When I put the snippet below in my .emacs I keep getting: Package `smex-' is unavailable.
I was wondering if this is expected functionality? The Emacs starter-kit did something similar which I remember working before. Using Emacs 24.3.
(when (not package-archive-contents)
(package-refresh-contents))
(defvar my-packages
'(smex))
(dolist (p my-packages)
(let ((s (symbol-name p)))
(when (not (package-installed-p s))
(package-install s))))
EDIT
Apparently this was caused by a bug or something. I was able to get it to work now in latest Emacs 24.3.1. Apparently they've also changed it so that package names should be symbols.
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(defvar my-packages
'(list of packages))
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))