1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-29 07:58:21 +00:00

org-element: Fix cache error on empty drawers

* lisp/org-element.el (org-element--cache-for-removal): Handle case
  when greater element is totally empty.

Thanks to Malcolm Purvis for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90639
This commit is contained in:
Nicolas Goaziou 2014-09-11 23:19:22 +02:00
parent 3d45b4285b
commit 6eb9827d53

View File

@ -5492,8 +5492,10 @@ changes."
(if (and (memq (org-element-type up)
'(center-block drawer dynamic-block
quote-block special-block))
(<= (org-element-property :contents-begin up) beg)
(> (org-element-property :contents-end up) end))
(let ((cbeg (org-element-property :contents-begin up)))
(and cbeg
(<= cbeg beg)
(> (org-element-property :contents-end up) end))))
;; UP is a robust greater element containing changes.
;; We only need to extend its ending boundaries.
(org-element--cache-shift-positions