lang/org: refactor org config load order

- No longer use org-load-hook; it was unnecessary and there were corner
  cases where org would get loaded before hooks were added to it.
- Update comments
- Remove config that was redundant with org's defaults (wrt org-file-apps)
- Perform persp-mode check before using persp-mode API in
  +org|exclude-agenda-buffers-from-workspace advice.
- Update outdated smartparens config and move it out of
  org-mode-hook (only needs to be run once, not everytime org-mode is
  enabled)
- Autoload mode hooks
This commit is contained in:
Henrik Lissner
2019-04-10 18:47:21 -04:00
parent 3da6c23d75
commit 653161fe2e
3 changed files with 117 additions and 135 deletions

View File

@@ -28,6 +28,9 @@ at the first function to return non-nil.")
org-src-window-setup 'current-window
org-confirm-babel-evaluate nil) ; you don't need my permission
;; Use major-mode native TAB indentation in SRC blocks
(advice-add #'org-return-indent :after #'+org*fix-newline-and-indent-in-src-blocks)
(defun +org*babel-lazy-load-library (info)
"Load babel libraries lazily when babel blocks are executed."
(let* ((lang (nth 0 info))