Function: org-cite-parse-elements
org-cite-parse-elements is a byte-compiled function defined in
oc.el.gz.
Signature
(org-cite-parse-elements S)
Documentation
Parse string S as a list of Org elements.
The return value is suitable as a replacement for a
"print_bibliography" keyword. As a consequence, the function
raises an error if S contains a headline.
Source Code
;; Defined in /usr/src/emacs/lisp/org/oc.el.gz
;;; Tools generating or operating on parsed data
(defun org-cite-parse-elements (s)
"Parse string S as a list of Org elements.
The return value is suitable as a replacement for a
\"print_bibliography\" keyword. As a consequence, the function
raises an error if S contains a headline."
(with-temp-buffer
(insert s)
(pcase (org-element-contents (org-element-parse-buffer))
('nil nil)
(`(,(and section (guard (org-element-type-p section 'section))))
(org-element-contents section))
(_
(error "Headlines cannot replace a keyword")))))