org-element--cache-submit-request: Re-enable future-change

* lisp/org-element.el (org-element--cache-submit-request): Re-enable
FUTURE-CHANGE argument in `org-element--cache-sync' call.  Without
this argument, cache can be processed incorrectly because elements
within changed region may be shifted and not deleted in subsequent
phase 0 request.
This commit is contained in:
Ihor Radchenko 2021-10-21 14:58:40 +08:00
parent a78282746d
commit f7403e56eb
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 3 deletions

View File

@ -6668,9 +6668,7 @@ change, as an integer."
;; yet to the otherwise correct part of the cache (i.e, before ;; yet to the otherwise correct part of the cache (i.e, before
;; the first request). ;; the first request).
(org-element--cache-log-message "Adding new phase 0 request") (org-element--cache-log-message "Adding new phase 0 request")
;; FIXME: Disabling this optimisation to hunt errors. (when next (org-element--cache-sync (current-buffer) end beg))
;; (when next (org-element--cache-sync (current-buffer) end beg))
(when next (org-element--cache-sync (current-buffer) end))
(let ((first (org-element--cache-for-removal beg end offset))) (let ((first (org-element--cache-for-removal beg end offset)))
(if first (if first
(push (let ((first-beg (org-element-property :begin first)) (push (let ((first-beg (org-element-property :begin first))