org-element: Unhide contents of collapsed elements before entering them

* contrib/lisp/org-element.el (org-element-down): Unhide contents of
  collapsed elements before entering them.
This commit is contained in:
Nicolas Goaziou 2012-03-14 14:19:08 +01:00
parent 07ac15ef72
commit 3fda301b07
1 changed files with 2 additions and 0 deletions

View File

@ -3919,6 +3919,8 @@ modified."
((eq (org-element-type element) 'plain-list)
(forward-char))
((memq (org-element-type element) org-element-greater-elements)
;; If contents are hidden, first disclose them.
(when (org-element-property :hiddenp element) (org-cycle))
(goto-char (org-element-property :contents-begin element)))
(t (error "No inner element")))))