1

I have added these lines to a file ~/.emacs.d/package_init.el

(require 'package) ;; You might already have this line
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/") t)
(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line

Then I both restarting aquamacs and runing m-x package-initialize, but I fail to find projectile in the listing. Here is a partial screenshot of the result of m-x package-list-packages

enter image description here

I have confirmed that this package exists on MELPA http://stable.melpa.org/#/projectile

What have I done wrong? How can I install this package?

  • From your screenshot it looks like this has nothing to do with projectile. None of the Melpa packages show up in your list. Could you edit your question/title to reflect that? – Malabarba Mar 28 '15 at 12:34
3

What have I done wrong? How can I install this package?

You said you added this configuration to a file called ~/.emacs.d/package_init.el, but Emacs will do nothing to load this file by itself. If you want the configurations to take effect, you need to either put them in ~/.emacs.d/init.el or add a line like the following inside your init.el:

(load (locate-user-emacs-file "package_init.el"))
  • You can use locate-user-emacs-file instead of expanding against user-emacs-directory. – lunaryorn Jun 15 '15 at 21:06
  • @lunaryorn true. Not to mention the snippet I had wss just wrong. :-P – Malabarba Jun 15 '15 at 21:09
1

Check *Messages* for any errors that come up when you do M-x package-initialize. You might also try doing a C-h v package-archives to make sure that http://melpa.org/packages/ is really there, and not getting removed somehow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.