diff --git a/lisp/org-element.el b/lisp/org-element.el index 48ede9c52..1f36775a7 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -5717,7 +5717,11 @@ This function assumes `org-element--headline-cache' is a valid AVL tree." ;; `combine-change-calls' because the buffer is potentially ;; changed without notice (the change will be registered ;; 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. (defun org-element-cache-hash-show-statistics ()