use org and org-contrib packages rather than org-plus-contrib
setup org-contrib in org layer rather than spacemacs-org layer follow-on fix for spacemacs-org layer
This commit is contained in:
parent
d9132f8bc0
commit
63197014cc
|
@ -454,9 +454,9 @@ cache folder.")
|
|||
(setq package-enable-at-startup nil)
|
||||
(package-initialize 'noactivate)
|
||||
;; hack to be sure to enable insalled org from Org ELPA repository
|
||||
(when (package-installed-p 'org-plus-contrib)
|
||||
(when (package-installed-p 'org)
|
||||
(spacemacs-buffer/message "Initializing Org early...")
|
||||
(configuration-layer//activate-package 'org-plus-contrib))))
|
||||
(configuration-layer//activate-package 'org))))
|
||||
|
||||
(defun configuration-layer//configure-quelpa ()
|
||||
"Configure `quelpa' package."
|
||||
|
@ -2605,7 +2605,8 @@ Original code from dochang at https://github.com/dochang/elpa-clone"
|
|||
(let (package-archive-contents
|
||||
(package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
("org" . "https://orgmode.org/elpa/")
|
||||
("gnu" . "https://elpa.gnu.org/packages/"))))
|
||||
("gnu" . "https://elpa.gnu.org/packages/")
|
||||
("nongnu" . "https://elpa.nongnu.org/nongnu/"))))
|
||||
(package-refresh-contents)
|
||||
(package-read-all-archive-contents)
|
||||
(let* ((packages (configuration-layer//get-indexed-elpa-package-names))
|
||||
|
@ -2847,40 +2848,6 @@ files."
|
|||
;; "spacelpa"
|
||||
;; spacemacs-cache-directory)
|
||||
|
||||
(defun configuration-layer//package-install-org (func &rest args)
|
||||
"Advice around `package-install' to patch package name and dependencies at
|
||||
install time in order to replace all `org' package installation by
|
||||
`org-plus-contrib'. We avoid installing unecessarily both `org' and
|
||||
`org-plus-contrib' at the same time (i.e. we always install `org-plus-contrib')"
|
||||
(let* ((pkg (car args))
|
||||
(patched
|
||||
(cond
|
||||
;; patch symbol name
|
||||
((and (symbolp pkg) (eq 'org pkg))
|
||||
(setcar args 'org-plus-contrib)
|
||||
t)
|
||||
;; patch name in package-desc object
|
||||
((and (package-desc-p pkg)
|
||||
(eq 'org (package-desc-name pkg)))
|
||||
(setf (package-desc-name pkg) 'org-plus-contrib)
|
||||
t)
|
||||
;; patch dependencies in package-desc object
|
||||
((and (package-desc-p pkg)
|
||||
(assq 'org (package-desc-reqs pkg)))
|
||||
(setf (car (assq 'org (package-desc-reqs pkg))) 'org-plus-contrib)
|
||||
t))))
|
||||
(let ((name (if (package-desc-p pkg)
|
||||
(package-desc-name pkg)
|
||||
pkg)))
|
||||
;; check manually if `org-plus-contrib' is already installed since
|
||||
;; package.el may install `org-plus-contrib' more than once.
|
||||
;; Maybe we could hook somewhere else (at transaction computation time?)
|
||||
(if (or patched (eq 'org-plus-contrib name))
|
||||
(unless (package-installed-p name)
|
||||
(apply func args))
|
||||
(apply func args)))))
|
||||
(advice-add 'package-install :around #'configuration-layer//package-install-org)
|
||||
|
||||
(defun configuration-layer//increment-error-count ()
|
||||
"Increment the error counter."
|
||||
(if configuration-layer-error-count
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
:toggle org-enable-notifications)
|
||||
(org-contacts :location built-in
|
||||
:toggle org-enable-org-contacts-support)
|
||||
org-contrib
|
||||
(org-vcard :toggle org-enable-org-contacts-support)
|
||||
org-brain
|
||||
(org-expiry :location built-in)
|
||||
|
@ -855,6 +856,10 @@ Headline^^ Visit entry^^ Filter^^ Da
|
|||
(spacemacs/set-leader-keys
|
||||
"aoCf" 'org-contacts-find-file))))
|
||||
|
||||
(defun org/init-org-contrib ()
|
||||
(use-package org-contrib
|
||||
:defer t))
|
||||
|
||||
(defun org/init-org-vcard ()
|
||||
(use-package org-vcard
|
||||
:defer t))
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
;; layer. So it is easier for users to steal the ownership of the
|
||||
;; `org' package.
|
||||
(default-org-config :location built-in)
|
||||
(org-plus-contrib :step pre)
|
||||
(org :step pre)
|
||||
org-superstar
|
||||
(space-doc :location local)
|
||||
toc-org
|
||||
|
@ -42,8 +42,8 @@
|
|||
(defun spacemacs-org/post-init-flyspell ()
|
||||
(spell-checking/add-flyspell-hook 'org-mode-hook))
|
||||
|
||||
;; dummy init function to force installation of `org-plus-contrib'
|
||||
(defun spacemacs-org/init-org-plus-contrib ())
|
||||
;; dummy init function to force installation of `org'
|
||||
(defun spacemacs-org/init-org ())
|
||||
|
||||
(defun spacemacs-org/init-default-org-config ()
|
||||
(use-package org
|
||||
|
|
Loading…
Reference in New Issue