org-element: Fix cache bug for orphaned elements
commit182ff104b77d1c4cd03a2749472d9da0c7733116
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Sun, 14 Jun 2015 12:52:04 +0000 (14 14:52 +0200)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Sun, 14 Jun 2015 12:52:04 +0000 (14 14:52 +0200)
tree8b5b4dc9d17cd129f1ee3caf87207f890823a4a7
parentd3196f053932346bec7e56215468e32500f1cc80
org-element: Fix cache bug for orphaned elements

* lisp/org-element.el (org-element--cache-sync-requests): Remove a now
  useless element from requests
(org-element--cache-submit-request): Apply change to sync request.
(org-element--cache-process-request): Apply change to sync requests.
Fix removal of orphaned elements, i.e., elements not affected by
a change, but with an ancestor that was.

* testing/lisp/test-org-element.el (test-org-element/cache): Add test.

Reported-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98260>
lisp/org-element.el
testing/lisp/test-org-element.el