Function: org-element-org-data-parser
org-element-org-data-parser is a byte-compiled function defined in
org-element.el.gz.
Signature
(org-element-org-data-parser &optional _)
Documentation
Parse org-data.
Return a new syntax node of org-data type containing :begin,
:contents-begin, :contents-end, :end, :post-blank,
:post-affiliated, and :path properties.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
(defun org-element-org-data-parser (&optional _)
"Parse org-data.
Return a new syntax node of `org-data' type containing `:begin',
`:contents-begin', `:contents-end', `:end', `:post-blank',
`:post-affiliated', and `:path' properties."
(org-with-wide-buffer
(let* ((begin 1)
(contents-begin (progn
(goto-char 1)
(org-skip-whitespace)
(forward-line 0)
(point)))
(end (point-max))
(contents-end end)
(robust-end contents-end)
(robust-begin (when (and robust-end
(< (+ 2 contents-begin) end))
(or
(org-with-wide-buffer
(goto-char (point-min))
(org-skip-whitespace)
(forward-line 0)
(while (and (org-at-comment-p) (bolp)) (forward-line))
(when (looking-at org-property-drawer-re)
(goto-char (match-end 0))
(min robust-end (point))))
(+ 2 contents-begin)))))
(org-element-create
'org-data
(list :begin begin
:contents-begin contents-begin
:contents-end contents-end
:end end
:robust-begin robust-begin
:robust-end robust-end
;; Trailing blank lines in org-data, headlines, and
;; sections belong to the containing elements.
:post-blank 0
:post-affiliated begin
:path (buffer-file-name)
:mode 'org-data
:buffer (current-buffer)
:deferred org-element--get-global-node-properties)))))