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

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

[elpa] externals/org 96746438c0 1/7: org-element--cache-find: Do not has


From: ELPA Syncer
Subject: [elpa] externals/org 96746438c0 1/7: org-element--cache-find: Do not hash section/org-data/table elements
Date: Thu, 9 Jun 2022 04:58:09 -0400 (EDT)

branch: externals/org
commit 96746438c0af25b1443fc2abe79a570ba72971d4
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-element--cache-find: Do not hash section/org-data/table elements
    
    * lisp/org-element.el (org-element--cache-find): Never use hashed
    elements with children that can have the same :begin property.
---
 lisp/org-element.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 28f4b5ce81..065b2a99ad 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5764,6 +5764,10 @@ the cache."
                    ;; Limit can be a list key.
                    (org-element--cache-key-less-p pos limit))
                (= pos (org-element-property :begin hashed))
+               ;; We cannot rely on element :begin for elements with
+               ;; children starting at the same pos.
+               (not (memq (org-element-type hashed)
+                        '(section org-data table)))
                (org-element-property :cached hashed))
           (progn
             (cl-incf (car org-element--cache-hash-statistics))



reply via email to

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