Function: org-export--parse-option-keyword
org-export--parse-option-keyword is a byte-compiled function defined
in ox.el.gz.
Signature
(org-export--parse-option-keyword OPTIONS &optional BACKEND)
Documentation
Parse an OPTIONS line and return values as a plist.
Optional argument BACKEND is an export backend, as returned by,
e.g., org-export-create-backend. It specifies which backend
specific items to read, if any.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
(defun org-export--parse-option-keyword (options &optional backend)
"Parse an OPTIONS line and return values as a plist.
Optional argument BACKEND is an export backend, as returned by,
e.g., `org-export-create-backend'. It specifies which backend
specific items to read, if any."
(let ((line
(let (alist)
(with-temp-buffer
(insert options)
(goto-char (point-min))
(while (re-search-forward "\\s-*\\(.+?\\):" nil t)
(when (looking-at-p "\\S-")
(push (cons (match-string 1)
(read (current-buffer))) ; moves point
alist))))
alist))
;; Priority is given to backend specific options.
(all (append (org-export-get-all-options backend)
org-export-options-alist))
(plist))
(when line
(dolist (entry all plist)
(let ((item (nth 2 entry)))
(when item
(let ((v (assoc-string item line t)))
(when v (setq plist (plist-put plist (car entry) (cdr v)))))))))))