On Wed, Jan 25, 2017 at 3:25 PM Lawrence Bottorff <
address@hidden> wrote:
I'm trying a clean install with this in my init.el
(require 'package)
(add-to-list 'package-archives
(add-to-list 'package-archives
;; Initialize all the ELPA packages (what is installed using the packages commands)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(package-refresh-contents) should be called every time if you tend to install package non-interactively i.e. not using M-x list-packages. You could have non-nil package-archive-contents but that value could be stale. This could be the problem.
(defvar my-packages
'(;; org mode
org
;; org mode plus contrib
org-plus-contrib))
Also not related to the problem, you do not need both org and org-plus-contrib. Just org-plus-contrib will suffice. See
http://orgmode.org/elpa.html
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
eval-buffer-ing this gives
package-compute-transaction: Package ‘org-plus-contrib-’ is unavailable
It's as if it's looking for a specific org-plus-contrib-xxxx.tar ? Never had this problem before.
Call package-refresh-contents unconditionally. That should fix the problem.