emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org aee3f2227f 1/4: * lisp/org.el (org-mode): Initializ


From: ELPA Syncer
Subject: [elpa] externals/org aee3f2227f 1/4: * lisp/org.el (org-mode): Initialize cache before parsing buffer keywords
Date: Sat, 16 Sep 2023 06:58:45 -0400 (EDT)

branch: externals/org
commit aee3f2227faeb95a58e127fff5c7445ff1c9822a
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    * lisp/org.el (org-mode): Initialize cache before parsing buffer keywords
    
    If we load cache after `org-set-regexp-and-options', we may do double
    job as `org-set-regexp-and-options' by itself queries cache.
---
 lisp/org.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 6b68851dd9..84ac874389 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4869,6 +4869,14 @@ The following commands are available:
      (vconcat (mapcar (lambda (c) (make-glyph-code c 'org-ellipsis))
                      org-ellipsis)))
     (setq buffer-display-table org-display-table))
+  ;; Initialize cache.
+  (org-element-cache-reset)
+  (when (and org-element-cache-persistent
+             org-element-use-cache)
+    (org-persist-load
+     `((elisp org-element--cache) (version ,org-element-cache-version))
+     (current-buffer)
+     'match-hash :read-related t))
   (org-set-regexps-and-options)
   (org-set-font-lock-defaults)
   (when (and org-tag-faces (not org-tags-special-faces-re))
@@ -4887,14 +4895,6 @@ The following commands are available:
   (add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local)
   ;; Check for invisible edits.
   (org-fold--advice-edit-commands)
-  ;; Initialize cache.
-  (org-element-cache-reset)
-  (when (and org-element-cache-persistent
-             org-element-use-cache)
-    (org-persist-load
-     `((elisp org-element--cache) (version ,org-element-cache-version))
-     (current-buffer)
-     'match-hash :read-related t))
   ;; Initialize macros templates.
   (org-macro-initialize-templates)
   ;; Initialize radio targets.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]