Function: org-ascii--list-tables
org-ascii--list-tables is a byte-compiled function defined in
ox-ascii.el.gz.
Signature
(org-ascii--list-tables KEYWORD INFO)
Documentation
Return a list of tables.
KEYWORD is the keyword that initiated the list of tables generation. INFO is a plist used as a communication channel.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-ascii.el.gz
(defun org-ascii--list-tables (keyword info)
"Return a list of tables.
KEYWORD is the keyword that initiated the list of tables
generation. INFO is a plist used as a communication channel."
(let ((title (org-ascii--translate "List of Tables" info)))
(concat
title "\n"
(make-string (string-width title)
(if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_))
"\n\n"
(let ((text-width
(if keyword (org-ascii--current-text-width keyword info)
(- (plist-get info :ascii-text-width)
(plist-get info :ascii-global-margin))))
;; Use a counter instead of retrieving ordinal of each
;; src-block.
(count 0))
(mapconcat
(lambda (table)
;; Store initial text so its length can be computed. This is
;; used to properly align caption right to it in case of
;; filling (like contents of a description list item).
(let* ((initial-text
(format (org-ascii--translate "Table %d:" info)
(cl-incf count)))
(initial-width (string-width initial-text)))
(concat
initial-text " "
(org-trim
(org-ascii--indent-string
(org-ascii--fill-string
;; Use short name in priority, if available.
(let ((caption (or (org-export-get-caption table t)
(org-export-get-caption table))))
(org-export-data caption info))
(- text-width initial-width) info)
initial-width)))))
(org-export-collect-tables info) "\n")))))