9

El-Get 文档说El-Get 支持 package.el ,MELPA 文档显示如何将 MELPA 与 package.el. 如何使用 El-Get 安装 MELPA 包?

尝试失败

我使用的是 Emacs 23,所以package.el不是 Emacs 的一部分。我package.el使用 El-Get 安装,但我不确定如何让 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接受的答案中的建议,现在一切正常。

4

1 回答 1

11

试试这个:

(require 'el-get-elpa)

然后调用:它使用来自 elpa 的食谱M-x el-get-elpa-build-local-recipes创建特殊目录,并且 el-get 现在会看到新食谱。../recipes/elpa

于 2014-04-19T11:23:05.327 回答