Sfoglia il codice sorgente

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.
Ihor Radchenko 3 anni fa
parent
commit
f7403e56eb
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. 1 3
      lisp/org-element.el

+ 1 - 3
lisp/org-element.el

@@ -6668,9 +6668,7 @@ change, as an integer."
         ;; yet to the otherwise correct part of the cache (i.e, before
         ;; the first 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))
+        (when next (org-element--cache-sync (current-buffer) end beg))
         (let ((first (org-element--cache-for-removal beg end offset)))
 	  (if first
 	      (push (let ((first-beg (org-element-property :begin first))