Function: org-element-type
org-element-type is a byte-compiled function defined in
org-element.el.gz.
Signature
(org-element-type ELEMENT)
Documentation
Return type of ELEMENT.
The function returns the type of the element or object provided.
It can also return the following special value:
plain-text for a string
org-data for a complete document
nil in any other case.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
;;; Accessors and Setters
;;
;; Provide four accessors: `org-element-type', `org-element-property'
;; `org-element-contents' and `org-element-restriction'.
;;
;; Setter functions allow modification of elements by side effect.
;; There is `org-element-put-property', `org-element-set-contents'.
;; These low-level functions are useful to build a parse tree.
;;
;; `org-element-adopt-elements', `org-element-set-element',
;; `org-element-extract-element' and `org-element-insert-before' are
;; high-level functions useful to modify a parse tree.
;;
;; `org-element-secondary-p' is a predicate used to know if a given
;; object belongs to a secondary string. `org-element-class' tells if
;; some parsed data is an element or an object, handling pseudo
;; elements and objects. `org-element-copy' returns an element or
;; object, stripping its parent property in the process.
(defsubst org-element-type (element)
"Return type of ELEMENT.
The function returns the type of the element or object provided.
It can also return the following special value:
`plain-text' for a string
`org-data' for a complete document
nil in any other case."
(cond
((not (consp element)) (and (stringp element) 'plain-text))
((symbolp (car element)) (car element))))