Function: org-ascii-template
org-ascii-template is a byte-compiled function defined in
ox-ascii.el.gz.
Signature
(org-ascii-template CONTENTS INFO)
Documentation
Return complete document string after ASCII conversion.
CONTENTS is the transcoded contents string. INFO is a plist holding export options.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-ascii.el.gz
(defun org-ascii-template (contents info)
"Return complete document string after ASCII conversion.
CONTENTS is the transcoded contents string. INFO is a plist
holding export options."
(let ((global-margin (plist-get info :ascii-global-margin)))
(concat
;; Build title block.
(org-ascii--indent-string
(concat (org-ascii-template--document-title info)
;; 2. Table of contents.
(let ((depth (plist-get info :with-toc)))
(when depth
(concat
(org-ascii--build-toc info (and (wholenump depth) depth))
"\n\n\n"))))
global-margin)
;; Document's body.
contents
;; Creator. Justify it to the bottom right.
(and (plist-get info :with-creator)
(org-ascii--indent-string
(let ((text-width
(- (plist-get info :ascii-text-width) global-margin)))
(concat
"\n\n\n"
(org-ascii--fill-string
(plist-get info :creator) text-width info 'right)))
global-margin)))))