Fix #36: use ELPA org instead of built-in org

This commit is contained in:
Henrik Lissner 2017-03-05 13:32:12 -05:00
parent d6667a433f
commit dd11790959
2 changed files with 14 additions and 4 deletions

View file

@ -57,12 +57,17 @@ missing) and shouldn't be deleted.")
(defvar doom-init-time nil (defvar doom-init-time nil
"The time it took, in seconds, for DOOM Emacs to initialize.") "The time it took, in seconds, for DOOM Emacs to initialize.")
(defvar doom--site-load-path load-path
"The load path of built in Emacs libraries.")
(defvar doom--package-load-path nil
"The load path of package libraries installed via ELPA or QUELPA.")
(defvar doom--base-load-path (defvar doom--base-load-path
(append (list doom-core-dir doom-modules-dir) (append (list doom-core-dir doom-modules-dir)
load-path) doom--site-load-path)
"A backup of `load-path' before it was altered by `doom-initialize'. Used as a "A backup of `load-path' before it was altered by `doom-initialize'. Used as a
base when running `doom/reload', or by `doom!', for calculating how many base by `doom!' and for calculating how many packages exist.")
packages exist.")
(setq load-prefer-newer nil (setq load-prefer-newer nil
package--init-file-ensured t package--init-file-ensured t
@ -123,7 +128,8 @@ to speed up startup."
;; Also, in some edge cases involving package initialization during a ;; Also, in some edge cases involving package initialization during a
;; non-interactive session, `package-initialize' fails to fill `load-path'. ;; non-interactive session, `package-initialize' fails to fill `load-path'.
;; If we want something done right, do it ourselves! ;; If we want something done right, do it ourselves!
(setq load-path (append load-path (directory-files package-user-dir t "^\\w" t))) (setq doom--package-load-path (directory-files package-user-dir t "^\\w" t)
load-path (append load-path doom--package-load-path))
;; Ensure core packages are installed ;; Ensure core packages are installed
(let ((core-packages (cl-remove-if 'package-installed-p doom-protected-packages))) (let ((core-packages (cl-remove-if 'package-installed-p doom-protected-packages)))

View file

@ -31,6 +31,10 @@
;; "A list of attachments for the current buffer. This is so my custom attachment ;; "A list of attachments for the current buffer. This is so my custom attachment
;; system can keep track of each buffer's attachments.") ;; system can keep track of each buffer's attachments.")
;; Ensure ELPA org is loaded instead of the built-in org.
(when-let (path (locate-library "org" nil doom--package-load-path))
(push (file-name-directory path) load-path))
(load! +attach) (load! +attach)
(load! +capture) (load! +capture)
(load! +export) (load! +export)