El-Get文档表示El-Get支持
package.el
,而MELPA文档展示了如何使用package.el
。如何使用El-Get安装MELPA软件包?
失败尝试
我正在使用Emacs 23,所以package.el
不是Emacs的一部分。我使用El-Get安装了package.el
,但我不知道如何让El-Get意识到MELPA。我尝试添加
;; Based on http://melpa.milkbox.net/#/getting-started .
(require 'package)
(add-to-list 'package-archives
;; The 't' means to append, so that MELPA comes after the more
;; stable ELPA archive.
'("melpa" . "http://melpa.milkbox.net/packages/") t)
;; Add ELPA if necessary. Looking at the El-Get package.rcp recipe in
;; ~/local/opt/el-get/recipes it seems this is probably unnecessary.
(when (< emacs-major-version 24)
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)
我的init-package.el
文件被El-Get引用,但我仍然无法在El-Get中看到MELPA软件包(例如使用M-x el-get-list-packages
命令)。
更新
我添加了
(require 'el-get-elpa)
;; Build the El-Get copy of the package.el packages if we have not
;; built it before. Will have to look into updating later ...
(unless (file-directory-p el-get-recipe-path-elpa)
(el-get-elpa-build-local-recipes))
按照被接受的答案建议,我将init-package.el
添加到我的代码中,现在一切都正常运行。
M-x el-get-elpa-build-local-recipes
需要定期运行吗?还是第一次后会自动更新? - echristopherson