Function: org-current-level

org-current-level is a byte-compiled function defined in org.el.gz.

Signature

(org-current-level)

Documentation

Return the level of the current entry, or nil if before the first headline.

The level is the number of stars at the beginning of the headline. Use org-reduced-level to remove the effect of org-odd-levels-only. Unlike org-outline-level, this function ignores inlinetasks.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-current-level ()
  "Return the level of the current entry, or nil if before the first headline.
The level is the number of stars at the beginning of the
headline.  Use `org-reduced-level' to remove the effect of
`org-odd-levels-only'.  Unlike `org-outline-level', this function
ignores inlinetasks."
  (let ((level (org-with-limited-levels (org-outline-level))))
    (and (> level 0) level)))