From ba9c43fc816134996e4a27bf7e96a9990541d990 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 30 Jun 2014 15:34:40 +0200 Subject: [PATCH] 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). --- lisp/org-element.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index 59a90fecc..6b04a33ff 100644 --- a/lisp/org-element.el +++ b/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