Function: org-heading-components
org-heading-components is a byte-compiled function defined in
org.el.gz.
Signature
(org-heading-components)
Documentation
Return the components of the current heading.
This is a list with the following elements:
- the level as an integer
- the reduced level, different if org-odd-levels-only is set.
- the TODO keyword, or nil
- the priority character, like ?A, or nil if no priority is given
- the headline text itself, or the tags string if no headline text
- the tags string, or nil.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-heading-components ()
"Return the components of the current heading.
This is a list with the following elements:
- the level as an integer
- the reduced level, different if `org-odd-levels-only' is set.
- the TODO keyword, or nil
- the priority character, like ?A, or nil if no priority is given
- the headline text itself, or the tags string if no headline text
- the tags string, or nil."
(save-excursion
(org-back-to-heading t)
(when (let (case-fold-search) (looking-at org-complex-heading-regexp))
(org-fold-core-remove-optimisation (match-beginning 0) (match-end 0))
(prog1
(list (length (match-string 1))
(org-reduced-level (length (match-string 1)))
(match-string-no-properties 2)
(and (match-end 3) (aref (match-string 3) 2))
(match-string-no-properties 4)
(match-string-no-properties 5))
(org-fold-core-update-optimisation (match-beginning 0) (match-end 0))))))