简体   繁体   English

我应该如何使用Emacs使用MELPA和MELPA-stable?

[英]How should I work with MELPA and MELPA-stable using Emacs?

I often run into a problem when I install packages with Emacs: what can I do if one of the packages is broken in melpa and the other is broken in melpa-stable ? 使用Emacs安装软件包时,我经常遇到问题:如果其中一个软件包在melpa损坏而另一个在melpa-stable中损坏, 怎么办? For example if I use melpa-stable elscreen fails on startup: 例如,如果我使用melpa-stable elscreen在启动时失败:

run-hooks: Symbol's function definition is void: elscreen-start

but if I run on melpa elscreen works but cider-nrepl fails to start up. 但是,如果我在melpa elscreen上运行,但cider-nrepl无法启动。 I checked their github profile and their build is currently failing. 我检查了他们的github个人资料,目前他们的构建失败。 Is there a way to work around this? 有办法解决这个问题吗?

You can use both melpa and melpa-stable , and pin certain packages to certain repositories by customizing package-pin-packages : 您可以同时使用melpamelpa-stable ,并通过自定义package-pin-packages某些软件包固定到某些存储库:

(require 'package)

(add-to-list 'package-archives
         '("melpa-stable" . "http://stable.melpa.org/packages/") t)
(add-to-list 'package-archives
         '("melpa" . "https://melpa.org/packages/") t)

(setq package-pinned-packages
      '((imenu-anywhere . "melpa-stable")
        (spaceline . "melpa-stable")
        (clj-refactor . "melpa-stable")
        (cider . "melpa-stable")
        (clojure-mode . "melpa-stable")
        (linum-relative . "melpa-stable")
        (aggressive-indent . "melpa-stable")
        (evil-leader . "melpa-stable")
        (evil-visualstart . "melpa-stable")
        (evil-jumper . "melpa-stable")
        (evil-snipe . "melpa-stable")
        (evil . "melpa-stable")
        (evil-commentary . "melpa-stable")))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM