Function: org-goto-first-child
org-goto-first-child is a byte-compiled function defined in org.el.gz.
Signature
(org-goto-first-child &optional ELEMENT)
Documentation
Goto the first child, even if it is invisible.
Return t when a child was found. Otherwise don't move point and return nil.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-goto-first-child (&optional element)
"Goto the first child, even if it is invisible.
Return t when a child was found. Otherwise don't move point and
return nil."
(let ((heading (org-element-lineage
(or element (org-element-at-point))
'(headline inlinetask org-data)
'with-self)))
(when heading
(unless (or (org-element-type-p heading 'inlinetask)
(not (org-element-contents-begin heading)))
(let ((pos (point)))
(goto-char (org-element-contents-begin heading))
(if (re-search-forward
org-outline-regexp-bol
(org-element-end heading)
t)
(progn (goto-char (match-beginning 0)) t)
(goto-char pos) nil))))))