Function: org-export-string-as
org-export-string-as is an autoloaded and byte-compiled function
defined in ox.el.gz.
Signature
(org-export-string-as STRING BACKEND &optional BODY-ONLY EXT-PLIST)
Documentation
Transcode STRING into BACKEND code.
BACKEND is either an export back-end, as returned by, e.g.,
org-export-create-backend, or a symbol referring to
a registered back-end.
When optional argument BODY-ONLY is non-nil, only return body code, without preamble nor postamble.
Optional argument EXT-PLIST, when provided, is a property list with external parameters overriding Org default settings, but still inferior to file-local settings.
Return code as a string.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
;;;###autoload
(defun org-export-string-as (string backend &optional body-only ext-plist)
"Transcode STRING into BACKEND code.
BACKEND is either an export back-end, as returned by, e.g.,
`org-export-create-backend', or a symbol referring to
a registered back-end.
When optional argument BODY-ONLY is non-nil, only return body
code, without preamble nor postamble.
Optional argument EXT-PLIST, when provided, is a property list
with external parameters overriding Org default settings, but
still inferior to file-local settings.
Return code as a string."
(with-temp-buffer
(insert string)
(let ((org-inhibit-startup t)) (org-mode))
(org-export-as backend nil nil body-only ext-plist)))