简体   繁体   English

从多个激活单个ELPA软件包

[英]Activate a single ELPA package out of many

I want to start Emacs from a clean state and activate only one package in ~/.emacs.d/elpa/ , not all of them. 我想从一个干净的状态启动Emacs并仅激活~/.emacs.d/elpa/一个软件包,而不是全部。 Specifically, I need to load a bleeding-edge version of Org-mode, while clean Emacs loads the built-in version. 具体来说,我需要加载组织模式的最新版本,而干净的Emacs则加载内置版本。 How do I do that? 我怎么做?

To run Emacs from a clean state, provide a -Q option: 要从干净状态运行Emacs,请提供-Q选项:

emacs -Q

Then run command eval-expression , usually M-: , and enter the following Lisp expression: 然后运行命令eval-expression ,通常是M-:,并输入以下Lisp表达式:

(let ((package-load-list '((org t)))) (package-initialize))

package-load-list variable holds packages that will load and activate when package-initialize is called. package-load-list变量包含将在调用package-initialize时加载并激活的package-initialize It's a list of pairs in the form of (PACKAGE VERSION) . 这是(PACKAGE VERSION)形式的成对清单。 You can put t instead of VERSION , and the newest version will be loaded. 您可以输入t而不是VERSION ,并且将加载最新版本。

emacs -Q -l ~/.emacs.d/elpa/org-bleedingedge/org-autoloads.el

should do it. 应该这样做。 Of course, if that "org" package requires others, it won't magically handle those dependencies. 当然,如果该“ org”软件包需要其他软件包,则不会神奇地处理那些依赖项。

You might find that How to start up emacs with different configurations covers this. 您可能会发现如何使用不同的配置启动emacs涵盖了这一点。 Create a new Emacs sandbox, install any packages you need, and you can run it side-by-side with your normal configuration. 创建一个新的Emacs沙箱,安装所需的任何软件包,然后可以与常规配置并行运行。

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

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