From 2598d48bba46435249402693edacfe65f22bdb2f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 4 Jan 2018 16:04:48 -0500 Subject: [PATCH] Add org elpa archive + update lang/org #327 Now that the org ELPA archive has https support, we can add it to package-archives. This fixes some 'org is unavailable' errors when installing org packages that have declared earlier versions of org as a dependency. This also makes installing a newer version of org-mode much simpler. Woo! --- core/core-packages.el | 3 ++- modules/lang/org/config.el | 7 ++++--- modules/lang/org/packages.el | 8 ++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index c40ef27b5..d486c5faf 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -92,7 +92,8 @@ base by `doom!' and for calculating how many packages exist.") package-enable-at-startup nil package-archives '(("gnu" . "https://elpa.gnu.org/packages/") - ("melpa" . "https://melpa.org/packages/")) + ("melpa" . "https://melpa.org/packages/") + ("org" . "https://orgmode.org/elpa/")) ;; I omit Marmalade because its packages are manually submitted rather ;; than pulled, so packages are often out of date with upstream. diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 6412459e5..422e0ea59 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -4,9 +4,10 @@ "The directory where org files are kept.") ;; Ensure ELPA org is prioritized above built-in org. -(when-let* ((path (locate-library "org" nil doom--package-load-path))) - (setq load-path (delete path load-path)) - (push (file-name-directory path) load-path)) +(when-let* ((path (locate-library "org" nil doom--base-load-path))) + (setq load-path + (delete (substring (file-name-directory path) 0 -1) + load-path))) ;; Sub-modules (if (featurep! +attach) (load! +attach)) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 37f729a8f..d6a7eca04 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -1,12 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/org/packages.el -(when (version< emacs-version "26.1") - ;; We want org 9.1.x, but the org packaged with Emacs 25.x and under is 8.x. - ;; The only secure (and reasonably trustworthy) source for this is via - ;; emacsmirror. Emacs 26+ comes with Org 9.1.4. - (package! org-plus-contrib - :recipe (:fetcher github :repo "emacsmirror/org" :files (:defaults "contrib/lisp/*.el")))) +;; Installs a cutting-edge version of org-mode +(package! org-plus-contrib) (package! org-bullets :recipe (:fetcher github :repo "hlissner/org-bullets")) (package! toc-org)