如何通过El-Get安装MELPA软件包?

时间:2014-04-19 02:37:43

标签: emacs melpa el-get

El-Get文档说El-Get supports package.el MELPA文档显示how to use MELPA with package.el。我如何能 使用El-Get?

安装MELPA软件包

尝试失败

我正在使用Emacs 23,因此package.el不属于Emacs。一世 使用El-Get安装package.el,但我不确定如何制作 El-了解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,如接受的答案所示,现在一切正常。

1 个答案:

答案 0 :(得分:9)

试试这个:

(require 'el-get-elpa)

然后调用M-x el-get-elpa-build-local-recipes:它会创建特殊目录../recipes/elpa,其中包含elpa和el-get的食谱,现在可以看到新的食谱。