branch: externals/org commit 7014675226eae17f3c7a6fa4c44a23daa7ae29ac Author: Ihor Radchenko <yanta...@gmail.com> Commit: Ihor Radchenko <yanta...@gmail.com>
org-mode: Fix cache loading order --- lisp/org.el | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 4e27c69261..b3c5f31045 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4882,7 +4882,7 @@ The following commands are available: (org-element-cache-reset) (when (and org-element-cache-persistent org-element-use-cache) - (org-persist-read 'org-element--cache (current-buffer))) + (org-persist-load 'org-element--cache (current-buffer) t)) ;; Initialize macros templates. (org-macro-initialize-templates) ;; Initialize radio targets. @@ -4894,11 +4894,6 @@ The following commands are available: (org-setup-filling) ;; Comments. (org-setup-comments-handling) - ;; Initialize cache. - (org-element-cache-reset) - (when (and org-element-cache-persistent - org-element-use-cache) - (org-persist-load 'org-element--cache (current-buffer) t)) ;; Beginning/end of defun (setq-local beginning-of-defun-function 'org-backward-element) (setq-local end-of-defun-function