0

In emacs 24.5.1,

M-x package-list-packages

shows the list of packages.

My understanding is, below elisp code should be part of my .emacs,

(require 'package)
(package-initialize)
(add-to-list 'package-archives '("melpa" . "http://melpa.milbox.net/packages" ) t)

I do not see/wrote any such elisp code in ~/.emacs or ~/.emacs.d/init.el

Question:

For given emacs, How to verify/troubleshoot, how package management tool(package) got installed?

  • The package system is initialized automatically after the init file has been processed, so in general you don't need such code in your init file (but there are reasons why you might choose to do so, and newer versions of Emacs will actually add a call to package-initialize automatically). See also stackoverflow.com/q/11127109 – phils May 15 '17 at 3:55
1

The gnu source comes pre-configured by default. It includes everything in the GNU ELPA.

The configuration you've listed is for MELPA, a different ELPA (Emacs Lisp Package Archive).

  • What is the url to be added to pick GNU ELPA in add-to-list directive? – overexchange May 15 '17 at 3:26
  • @overexchange C-h v package-archives RET – Sean Allred May 15 '17 at 3:27
  • What does t signify in add-to-list syntax? above. Any resource to read on this – overexchange May 15 '17 at 3:33
  • You can read documentation for any Emacs function like so: C-h f add-to-list – phils May 15 '17 at 3:51
  • @overexchange you might also be interested in plain ole' C-h C-h :-) – Sean Allred May 15 '17 at 3:57

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