forked from mirrors/org-mode
org-element--cache-active-p: Fix when cache is disabled in indirect buffers
* lisp/org-element.el (org-element--cache-active-p): Consider cache disabled when any of the indirect buffers do not have modification detection. This can be important when one uses `combine-after-change-calls' inside an indirect buffers disabling `after-change-functions' temporarily in the indirect buffer. Reported-by: Feng Shu <tumashu@163.com> Link: https://orgmode.org/list/87359z8ssb.fsf@163.com
This commit is contained in:
parent
461eb2a0ec
commit
7e6b55b8fd
|
@ -5717,7 +5717,11 @@ This function assumes `org-element--headline-cache' is a valid AVL tree."
|
||||||
;; `combine-change-calls' because the buffer is potentially
|
;; `combine-change-calls' because the buffer is potentially
|
||||||
;; changed without notice (the change will be registered
|
;; changed without notice (the change will be registered
|
||||||
;; after exiting the `combine-change-calls' body though).
|
;; after exiting the `combine-change-calls' body though).
|
||||||
(memq #'org-element--cache-after-change after-change-functions))))))
|
(catch :inhibited
|
||||||
|
(org-fold-core-cycle-over-indirect-buffers
|
||||||
|
(unless (memq #'org-element--cache-after-change after-change-functions)
|
||||||
|
(throw :inhibited nil)))
|
||||||
|
t))))))
|
||||||
|
|
||||||
;; FIXME: Remove after we establish that hashing is effective.
|
;; FIXME: Remove after we establish that hashing is effective.
|
||||||
(defun org-element-cache-hash-show-statistics ()
|
(defun org-element-cache-hash-show-statistics ()
|
||||||
|
|
Loading…
Reference in a new issue