0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

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.
This commit is contained in:
Ihor Radchenko 2022-06-09 15:04:37 +08:00
parent c02c0d660d
commit 96746438c0
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -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))