How can I ensure I'm downloading and using org-plus-contrib from the org-mode repository using require or use-package? Package.el downloads the package, compiles everything and then says it can't load org-plus-contrib. This thread on the mailing list discusses a similar, but inverted problem. However, if I place (use-package org ..., use-package returns t, but does so whether org-plus-contrib is installed or not.

  • Why not simply (use-package org-plus-contrib :ensure t)? Granted that I'm using cask with pallet for package managment, but it places /home/kmicu/.emacs.d/.cask/24.4.1/elpa/org-plus-contrib-20150202 in my path and loads it.
    – kmicu
    Commented Feb 2, 2015 at 21:57
  • Remember that org-plus-contrib contains org files plus all contribs files. You should install org xor org-plus-contrib, but not both.
    – kmicu
    Commented Feb 2, 2015 at 22:08
  • Maybe you can try with package-pinned-packages
    – csantosb
    Commented Feb 3, 2015 at 22:07

3 Answers 3


I'm not 100% sure you can really reliably check with only require or use-package... But if you are using package.el for org-mode functionality, your org-mode configuration may need to be deferred until after your packages have been initialized. You can do this with a hook the runs after Emacs has initialized called "after-init-hook".


That means in your .emacs, you'll need a hook like:

(add-hook 'after-init-hook 'package-config)

And somewhere else:

(defun package-config ()
;;Your org-mode config goes here.

After that, you have access to package.el's checking and downloading functionality...

so, since you also want to check for the package's existence, you can use "(package-installed-p 'org-plus-contrib)" and install it with "(package-install package)" if it is not there.

Altogether, the code would probably look something like:

(defun package-config ()
  (unless (package-installed-p 'org-plus-contrib)
    (package-install 'org-plus-contrib)))

(add-hook 'after-init-hook 'package-config)

With the rest of your config being after the (unless ...) body.

That way, you get your configuration, you get your package install checking, and you get it automatically downloaded so you can safely assume that anything past that line in the function can use the loaded contribs. (Assuming you have a network connection if it doesn't exist.)


The correct way to do this with use-package is as follows:

(use-package org
  :ensure org-plus-contrib

The first argument makes sure that it is the org.el file being sourced. The :ensure argument makes sure that you are getting the version with all the extras. Of course you also need to have ("org" . "http://orgmode.org/elpa/") in your package-archives alist.

  • I had no idea ensure didn't have to be a boolean. Good to know!
    – wdkrnls
    Commented Oct 23, 2015 at 17:01
  • I'm using this in my config, but whenever a third-party package (e.g., elfeed-org) gets installed with use-package, the default org is downloaded and installed. This cannot be right, any ideas how I can prevent that from happening?
    – andreas-h
    Commented Oct 7, 2017 at 22:04
  • @AlfredM. that's not mentioned in orgmode.org/elpa.html anymore Commented May 11, 2020 at 7:17

I do a package-install org-plus-contrib manually, but then subsequently do use-package org. Finally, a subsequent M-x org-version indicates that the org provided by org-plus-contrib is indeed used and all is well.

  • Interesting, do you use any contrib provide functionality?
    – wdkrnls
    Commented Sep 7, 2015 at 0:34
  • Yes, a few items, though I don't recall which ones at this moment.
    – Joe
    Commented Sep 7, 2015 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.