Function: org-back-to-heading
org-back-to-heading is a byte-compiled function defined in org.el.gz.
Signature
(org-back-to-heading &optional INVISIBLE-OK)
Documentation
Go back to beginning of heading or inlinetask.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-back-to-heading (&optional invisible-ok)
"Go back to beginning of heading or inlinetask."
(forward-line 0)
(or (and (org-at-heading-p (not invisible-ok))
(not (and (featurep 'org-inlinetask)
(fboundp 'org-inlinetask-end-p)
(org-inlinetask-end-p))))
(unless
(org-element-lineage-map
(org-element-at-point)
(lambda (el)
(goto-char (org-element-begin el))
(or invisible-ok (not (org-fold-folded-p))))
'(headline inlinetask)
'with-self 'first-match)
(user-error "Before first headline at position %d in buffer %s"
(point) (current-buffer))))
(point))