How can I get package-el
to list packages again?
This morning I did a routine M-x package-list-packages
on my Emacs 24.3.1 W32 installation. In a fit of ill-judged bravado I used U
to upgrade all 15 packages that could be upgraded. When the dust had settled and I rebooted Emacs, I saw a number of errors that seem to be related to absolute paths being used to refer to various packages in my init files. This post covers a similar problem but does not seem to have been resolved. I note that other people are having similar issues so my situation is not unique.
I've managed to mostly fix the problems I encountered, but package-list-packages
no longer works as it cannot find and load the archives file/s, generating the following messages:
Contacting host: tromey.com:80
Saving file g:/Dropbox/code/.emacs.d/.emacs.d/elpa/archive-contents...
Wrote g:/Dropbox/code/.emacs.d/.emacs.d/elpa/archive-contents
Contacting host: tromey.com:80
Saving file g:/Dropbox/code/.emacs.d/.emacs.d/elpa/builtin-packages...
Wrote g:/Dropbox/code/.emacs.d/.emacs.d/elpa/builtin-packages
if: Cannot open load file: g:/Dropbox/code/.emacs.d/.emacs.d/elpa/archives/-pkg
The directory G:/Dropbox/Code/.emacs.d/.emacs.d/elpa/archives
contains 3 folders, gnu
, marmalade
and melpa
and each contains a file named archive-contents
which is what I would expect.
The situation is similar to the one outlined in this question but the proposed solution doesn't seem appropriate here as I am already using the version of package.el
that is suggested in that post (0.9). Trying a newer version (1.0.1) gives me a different error related to package--description-file
. (This is also the error reported in this cry for help but I haven't been using snapshot version of Emacs.)
My .init file has these two lines at the top (perhaps the second is redundant?):
(add-to-list 'load-path "g:/dropbox/code/.emacs.d/")
(add-to-list 'load-path "g:/dropbox/code/.emacs.d/.emacs.d/elpa/")
and this call at the bottom:
(load-file "G:/dropbox/code/.emacs.d/initfiles/init-package.el")
which in turn contains this:
(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")))
Any suggestions as to what I have broken and how to fix it?