简体   繁体   中英

Any way to prevent emacs package manager from loading a single package on startup?

Basically, I share a single .emacs.d across several machines and have one package that I only want on my home machine (org-journal). I like using the package manager to keep this up to date, but it loads the package on every machine which causes some interference to a normal work flow.

Is there a way to get the package manager to skip loading this one package but load all others?

ETA: I tried only loading it on my desktop via

(when (string-equal (system-name) "will-desktop") 
     (require 'org-journal))

but that didn't work because using (package-initialize) early on in my init.el automatically loads it.

See the package-load-list variable.

The default value is (all) , and the docstring says that all affects only packages not specified by other elements, so by my reading, you could simply add the following to inhibit org-journal :

(setq package-load-list '((org-journal nil) all))

If you're forcibly initialising the package manager in your init file, make sure you make this change beforehand.

Edit: Tested and updated/fixed. add-to-list was wrong, as the variable isn't already defined at that point.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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