Added check to catch when org has already been loaded.

This commit is contained in:
Tony Day 2015-11-22 07:29:05 +10:00 committed by Eivind Fonn
parent ddcc697213
commit 3f72bec69a
3 changed files with 9 additions and 2 deletions

View File

@ -216,8 +216,8 @@ values."
(defun dotspacemacs/user-init ()
"Initialization function for user code.
It is called immediately after `dotspacemacs/init'. You are free to put any
user code."
It is called immediately after `dotspacemacs/init'. You are free to put almost any
user code here. The exception is org related code, which should be placed in dotspacemacs/user-config."
)
(defun dotspacemacs/user-config ()

View File

@ -42,6 +42,8 @@ Since version 0.104, spacemacs uses the `org` version from the org ELPA
repository instead of the one shipped with emacs. Then, any `org` related code
should not be loaded before `dotspacemacs/user-config`, otherwise both versions
will be loaded and will conflict.
Org layer checks if this has occurred and signals an error if org features have
been instantiated prior to org layer loading.
* Install
** Layer

View File

@ -80,6 +80,11 @@
:defer t
:init
(progn
(when (member 'org features)
(configuration-layer//set-error)
(spacemacs-buffer/append
"Org features have been loaded before the spacemacs org layer has initialised. \nTry removing org code from user initialisation and private layers." t
))
(setq org-clock-persist-file
(concat spacemacs-cache-directory "org-clock-save.el")
org-id-locations-file