Skip to content

Commit

Permalink
Add org elpa archive + update lang/org #327
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
hlissner committed Jan 4, 2018
1 parent 7556762 commit 2598d48
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion core/core-packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 4 additions & 3 deletions modules/lang/org/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
8 changes: 2 additions & 6 deletions modules/lang/org/packages.el
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 2598d48

Please sign in to comment.