Jelajahi Sumber

org-element: Do not trust a stored request after cache sync

* lisp/org-element.el (org-element--cache-submit-request): Do not
  trust a stored request after calling `org-element--cache-sync' since
  it may as well not exist anymore (i.e., the synchronization was
  complete).
Nicolas Goaziou 10 tahun lalu
induk
melakukan
ba9c43fc81
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      lisp/org-element.el

+ 2 - 1
lisp/org-element.el

@@ -5548,7 +5548,8 @@ change, as an integer."
 		org-element--cache-sync-requests))
 	 ;; No element to remove.  No need to re-parent either.
 	 ;; Simply shift additional elements, if any, by OFFSET.
-	 (next (incf (aref next 3) offset)))))))
+	 (org-element--cache-sync-requests
+	  (incf (aref (car org-element--cache-sync-requests) 3) offset)))))))
 
 
 ;;;; Public Functions