On Mac OS, Emacs 28.2, I have the following lines at the top of my init.el
(require 'package)
(add-to-list 'package-archives
'("org" . "https://orgmode.org/elpa/")
'("melpa" . "http://melpa.org/packages/"))
(unless package-archive-contents
(package-refresh-contents))
(package-initialize)
But when I run M-x package-list-packages
, I don't see any package from MELPA. Under the column "Archive", I only see gnu
or nongnu
. Running M-x package-refresh-contents
doesn't help. I get no error at startup and the file emacs.d/elpa/archives/melpa/archive-contents
exists.
I am trying to install some MELPA packages like quelpa, but something seems broken. What is the fix?
add-to-list
incorrectly. DoC-h f add-to-list
to read its doc string: that would alert you to the fact that you can only use it to add one element at a time. Emacs provides documentation at your fingertips, but you have to learn how to use that facility. DoC-h C-h
and explore!