I have been setting up my emacs on a mac. I haven't been able to install any packages or even list available packages since I have set up my emacs installation on this computer. Every time I try to refresh the contents of the package repositories I get the following error and backtrace:
Debugger entered--Lisp error: (wrong-type-argument listp <!DOCTYPE)
package--read-archive-file("archives/marmalade/archive-contents")
package-read-archive-contents("marmalade")
package-read-all-archive-contents()
package--update-downloads-in-progress(("melpa-stable" . "http://stable.melpa.org/packages/"))
package--download-one-archive(("melpa-stable" . "http://stable.melpa.org/packages/") "archive-contents" nil)
package--download-and-read-archives(nil)
package-refresh-contents()
funcall-interactively(package-refresh-contents)
#<subr call-interactively>(package-refresh-contents record nil)
ad-Advice-call-interactively(#<subr call-interactively> package-refresh-contents record nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (package-refresh-contents record nil))
call-interactively(package-refresh-contents record nil)
command-execute(package-refresh-contents record)
execute-extended-command(nil "package-refresh-contents")
smex-read-and-run(("pwd" "ido-wide-find-file-or-pop-dir" "bookmark-delete" "bookmark-jump" "bookmark-set" "replace-string" "flower-client-connect" "tramp-cleanup-connection" "rgrep" "tramp-cleanup-all-buffers" "tramp-cleanup-all-connections" "package-install" "magit-status" "flycheck-mode" "flycheck-set-checker-executable" "grep" "goto-line" "yank" "js2-mode" "grep-find" "rename-file" "magit-commit" "revert-buffer" "shrink-window" "clipboard-yank" "make-directory" "tramp-cleanup-this-connection" "5x5" "slime" "version" "php-mode" "web-mode" "irony-mode" "company-mode" "magit-rebase" "enlarge-window" "undo-tree-mode" "whitespace-mode" "package-initialize" "package-refresh-contents" "term" "imenu" "shell" "doctor" "eshell" "blackbox" "sgml-mode" "tern-mode" "tramp-bug" "calculator" ...))
smex()
funcall-interactively(smex)
#<subr call-interactively>(smex nil nil)
ad-Advice-call-interactively(#<subr call-interactively> smex nil nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (smex nil nil))
call-interactively(smex nil nil)
command-execute(smex)
Below is my code that I use to initialize the package repos.
;; Package Managers
(require 'package)
(package-initialize)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.com/packages/"))
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa-stable" . "http://stable.melpa.org/packages/") t)
Has anyone else had an issue like this? How do I get a clean response from the package repositories so I can install packages?
EDIT:
I am using GNU Emacs version 25.1.1
The problem was that their is no http://marmalade-repo.com/packages/. The correct url is https://marmalade-repo.org/packages/.
Credit goes to @jenesaisquoi. This user found the answer in the comments on my original post.
;; Package Managers
(require 'package)
(package-initialize)
(add-to-list 'package-archives
'("marmalade" . "https://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa-stable" . "http://stable.melpa.org/packages/") t)