如何通过El-Get安装MELPA包? [英] How do I install MELPA packages via El-Get?
问题描述
El-Get文档说, El-Get支持
package.el
和MELPA文档显示如何使用MELPA与
package.el
。
如何使用El-Get安装MELPA包?
The El-Get documentation says that El-Get supports
package.el
and the MELPA documentation shows how to use MELPA with
package.el
. How do I
install MELPA packages using El-Get?
使用Emacs 23,所以 package.el
不是Emacs的一部分。我使用El-Get安装了$
package.el
,但我不知道如何使
El-Get了解MELPA。我尝试添加
I'm using Emacs 23, so package.el
is not part of Emacs. I
installed package.el
using El-Get, but I'm not sure how to make
El-Get aware of MELPA. I tried adding
;; 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包(例如使用 Mx el-get-list-packages
)。
to my init-package.el
which is sourced by El-Get, but I still don't
see the MELPA packages in El-Get (e.g. with 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
as建议在接受的答案,现在一切正常。
to my init-package.el
as suggested in the accepted answer and now everything works.
推荐答案
尝试这个:
(require 'el-get-elpa)
然后调用 Mx el-get-elpa-build-local-recipes
:它创建特殊目录 ../ recipes / elpa
来自elpa和el-get的食谱现在可以看到新的食谱。
and then call M-x el-get-elpa-build-local-recipes
: it creates special directory ../recipes/elpa
with recipes from elpa and el-get sees new recipes now.
这篇关于如何通过El-Get安装MELPA包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!