From 6e8d89ef612c4429428ab3073b989b20979a774f Mon Sep 17 00:00:00 2001 From: AdrieanKhisbe Date: Wed, 2 Dec 2015 07:18:58 +0100 Subject: [PATCH] Add Documentation about how to avoid conflict built on #3277 cf #3562 --- doc/FAQ.org | 12 ++++++++++++ layers/org/README.org | 16 +++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/doc/FAQ.org b/doc/FAQ.org index 9a467c7ea..ed14b0ff4 100644 --- a/doc/FAQ.org +++ b/doc/FAQ.org @@ -92,6 +92,18 @@ 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. +Because of autoloading, calling to `org` function will trigger the loading up +of the `org` shipped with emacs wich will induce conflicts. +One way to do your `org` config is to wrap you config code in a +`with-eval-after-load` block. + +#+BEGIN_SRC emacs-lisp + (with-eval-after-load 'org + ;; here goes your Org config :) + ;; .... + ) +#+END_SRC + ** Why is Spacemacs hanging on startup? This is probably related to Helm using Tramp which tries to figure out some SSH/DNS settings at startup. The root cause is probably your ISP redirecting diff --git a/layers/org/README.org b/layers/org/README.org index a12ef4695..9d4c4bfda 100644 --- a/layers/org/README.org +++ b/layers/org/README.org @@ -38,13 +38,23 @@ This layer enables [[http://orgmode.org/][org mode]] for Spacemacs. - presentation mode via [[https://github.com/rlister/org-present][org-present]] - ** Note -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 +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. +One way to do your =org= config is to wrap you config code in a +=with-eval-after-load= block. + +#+BEGIN_SRC emacs-lisp + (with-eval-after-load 'org + ;; here goes your Org config :) + ;; .... + ) +#+END_SRC + * Install ** Layer To use this contribution add it to your =~/.spacemacs=