Function: org-element-parse-secondary-string
org-element-parse-secondary-string is a byte-compiled function defined
in org-element.el.gz.
Signature
(org-element-parse-secondary-string STRING RESTRICTION &optional PARENT)
Documentation
Recursively parse objects in STRING and return structure.
RESTRICTION is a symbol limiting the object types that will be looked after.
Optional argument PARENT, when non-nil, is the element or object
containing the secondary string. It is used to set correctly
:parent property within the string.
If STRING is the empty string or nil, return nil.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
(defun org-element-parse-secondary-string (string restriction &optional parent)
"Recursively parse objects in STRING and return structure.
RESTRICTION is a symbol limiting the object types that will be
looked after.
Optional argument PARENT, when non-nil, is the element or object
containing the secondary string. It is used to set correctly
`:parent' property within the string.
If STRING is the empty string or nil, return nil."
(cond
((not string) nil)
((equal string "") nil)
(t (let ((local-variables (buffer-local-variables)))
(with-temp-buffer
(dolist (v local-variables)
(ignore-errors
(if (symbolp v) (makunbound v)
;; Don't set file name to avoid mishandling hooks (bug#44524)
(unless (memq (car v) '(buffer-file-name buffer-file-truename))
(set (make-local-variable (car v)) (cdr v))))))
;; Transferring local variables may put the temporary buffer
;; into a read-only state. Make sure we can insert STRING.
(let ((inhibit-read-only t)) (insert string))
;; Prevent "Buffer *temp* modified; kill anyway?".
(restore-buffer-modified-p nil)
(org-element--parse-objects
(point-min) (point-max) nil restriction parent))))))