Function: org-before-first-heading-p

org-before-first-heading-p is a byte-compiled function defined in org.el.gz.

Signature

(org-before-first-heading-p)

Documentation

Before first heading? Respect narrowing.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-before-first-heading-p ()
  "Before first heading?
Respect narrowing."
  (let ((cached (org-element-at-point nil 'cached)))
    (if cached
        (let ((cached-headline (org-element-lineage cached '(headline) t)))
          (or (not cached-headline)
              (< (org-element-property :begin cached-headline) (point-min))))
      (org-with-limited-levels
       (save-excursion
         (end-of-line)
         (null (re-search-backward org-outline-regexp-bol nil t)))))))