Function: org-element-type
org-element-type is a byte-compiled function defined in
org-element-ast.el.gz.
Signature
(org-element-type NODE &optional ANONYMOUS)
Documentation
Return type of NODE.
The function returns the type of the node provided.
It can also return the following special value:
plain-text for a string
nil in any other case.
When optional argument ANONYMOUS is non-nil, return symbol anonymous
when NODE is an anonymous node.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element-ast.el.gz
(require 'subr-x) ;; FIXME: Required for Emacs 27
;;;; Syntax node type
(defun org-element-type (node &optional anonymous)
"Return type of NODE.
The function returns the type of the node provided.
It can also return the following special value:
`plain-text' for a string
nil in any other case.
When optional argument ANONYMOUS is non-nil, return symbol `anonymous'
when NODE is an anonymous node."
(declare (pure t))
(cond
((stringp node) 'plain-text)
((null node) nil)
((not (consp node)) nil)
((symbolp (car node)) (car node))
((and anonymous (car node) (org-element-type (car node) t))
'anonymous)
(t nil)))