2013-01-27 22:11:34 +00:00
|
|
|
|
;;; ox-ascii.el --- ASCII Back-End for Org Export Engine
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2014-01-07 13:18:17 +00:00
|
|
|
|
;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
;; Author: Nicolas Goaziou <n.goaziou at gmail dot com>
|
|
|
|
|
;; Keywords: outlines, hypermedia, calendar, wp
|
|
|
|
|
|
Backport changes from Emacs revs 115081 and 115082
2013-11-12 Stefan Monnier <monnier@iro.umontreal.ca>
Address some byte-compiler warnings.
* ob-abc.el (org-babel-expand-body:abc): Use dolist.
(org-babel-execute:abc): Fix regexp quoting.
* ob-calc.el (org--var-syms): Rename from `var-syms'.
* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
* ob-table.el (sbe): Move debug declaration.
* org-clock.el (org--msg-extra): Rename from `msg-extra'.
* org.el (org-version): Avoid var name starting with _.
(org-inhibit-startup, org-called-with-limited-levels)
(org-link-search-inhibit-query, org-time-was-given)
(org-end-time-was-given, org-def, org-defdecode, org-with-time):
* org-colview.el (org-agenda-overriding-columns-format):
* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
(org-agenda-show-log-scoped):
* ob-python.el (py-which-bufname, python-shell-buffer-name):
* ob-haskell.el (org-export-copy-to-kill-ring):
* ob-exp.el (org-link-search-inhibit-query):
* ob-R.el (ess-eval-visibly-p):
* ob-core.el (org-src-window-setup): Declare before use.
(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
* ox-odt.el (org-odt-hfy-face-to-css):
* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
(org-bibtex-check):
* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
(org-babel-tangle-single-block, org-babel-tangle-comment-links):
* ob-table.el (sbe):
* ob-sqlite.el (org-babel-sqlite-expand-vars):
* ob-sql.el (org-babel-sql-expand-vars):
* ob-shen.el (org-babel-execute:shen):
* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
* ob-scala.el (org-babel-scala-evaluate):
* ob-ruby.el (org-babel-ruby-table-or-string)
(org-babel-ruby-evaluate):
* ob-python.el (org-babel-python-table-or-string)
(org-babel-python-evaluate-external-process)
(org-babel-python-evaluate-session):
* ob-picolisp.el (org-babel-execute:picolisp):
* ob-perl.el (org-babel-perl-evaluate):
* ob-maxima.el (org-babel-execute:maxima):
* ob-lisp.el (org-babel-execute:lisp):
* ob-java.el (org-babel-execute:java):
* ob-io.el (org-babel-io-evaluate):
* ob-haskell.el (org-babel-execute:haskell):
* ob-fortran.el (org-babel-execute:fortran):
* ob-exp.el (org-babel-exp-code):
* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
* ob-ditaa.el (org-babel-execute:ditaa):
* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
(org-babel-parse-header-arguments, org-babel-reassemble-table)
(org-babel-goto-src-block-head, org-babel-mark-block)
(org-babel-expand-noweb-references, org-babel-script-escape)
(org-babel-process-file-name):
* ob-clojure.el (org-babel-execute:clojure):
* ob-calc.el (org-babel-execute:calc):
* ob-awk.el (org-babel-execute:awk):
* ob-abc.el (org-babel-execute:abc):
* ob-R.el (org-babel-expand-body:R):
* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).
2013-11-12 Glenn Morris <rgm@gnu.org>
* ox-html.el (org-html-scripts): Add 2013 to copyright years.
(org-html-infojs-template): Copyright holder to FSF.
2013-11-12 19:57:31 +00:00
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2013-02-23 08:56:24 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
2013-02-23 08:56:24 +00:00
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2013-02-23 08:56:24 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
2012-07-25 10:55:00 +00:00
|
|
|
|
;;
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; This library implements an ASCII back-end for Org generic exporter.
|
2013-10-20 08:58:30 +00:00
|
|
|
|
;; See Org manual for more information.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
(eval-when-compile (require 'cl))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(require 'ox)
|
|
|
|
|
(require 'ox-publish)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2012-08-03 07:56:40 +00:00
|
|
|
|
(declare-function aa2u "ext:ascii-art-to-unicode" ())
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2012-05-18 08:18:42 +00:00
|
|
|
|
;;; Define Back-End
|
|
|
|
|
;;
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; The following setting won't allow to modify preferred charset
|
|
|
|
|
;; through a buffer keyword or an option item, but, since the property
|
|
|
|
|
;; will appear in communication channel nonetheless, it allows to
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; override `org-ascii-charset' variable on the fly by the ext-plist
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; mechanism.
|
2012-05-18 08:18:42 +00:00
|
|
|
|
;;
|
2012-02-13 12:50:28 +00:00
|
|
|
|
;; We also install a filter for headlines and sections, in order to
|
|
|
|
|
;; control blank lines separating them in output string.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-03-19 15:24:40 +00:00
|
|
|
|
(org-export-define-backend 'ascii
|
|
|
|
|
'((bold . org-ascii-bold)
|
|
|
|
|
(center-block . org-ascii-center-block)
|
|
|
|
|
(clock . org-ascii-clock)
|
|
|
|
|
(code . org-ascii-code)
|
|
|
|
|
(comment . (lambda (&rest args) ""))
|
|
|
|
|
(comment-block . (lambda (&rest args) ""))
|
|
|
|
|
(drawer . org-ascii-drawer)
|
|
|
|
|
(dynamic-block . org-ascii-dynamic-block)
|
|
|
|
|
(entity . org-ascii-entity)
|
|
|
|
|
(example-block . org-ascii-example-block)
|
|
|
|
|
(export-block . org-ascii-export-block)
|
|
|
|
|
(export-snippet . org-ascii-export-snippet)
|
|
|
|
|
(fixed-width . org-ascii-fixed-width)
|
|
|
|
|
(footnote-reference . org-ascii-footnote-reference)
|
|
|
|
|
(headline . org-ascii-headline)
|
|
|
|
|
(horizontal-rule . org-ascii-horizontal-rule)
|
|
|
|
|
(inline-src-block . org-ascii-inline-src-block)
|
|
|
|
|
(inlinetask . org-ascii-inlinetask)
|
|
|
|
|
(inner-template . org-ascii-inner-template)
|
|
|
|
|
(italic . org-ascii-italic)
|
|
|
|
|
(item . org-ascii-item)
|
|
|
|
|
(keyword . org-ascii-keyword)
|
|
|
|
|
(latex-environment . org-ascii-latex-environment)
|
|
|
|
|
(latex-fragment . org-ascii-latex-fragment)
|
|
|
|
|
(line-break . org-ascii-line-break)
|
|
|
|
|
(link . org-ascii-link)
|
2013-09-25 19:27:29 +00:00
|
|
|
|
(node-property . org-ascii-node-property)
|
2013-03-19 15:24:40 +00:00
|
|
|
|
(paragraph . org-ascii-paragraph)
|
|
|
|
|
(plain-list . org-ascii-plain-list)
|
|
|
|
|
(plain-text . org-ascii-plain-text)
|
|
|
|
|
(planning . org-ascii-planning)
|
2013-09-25 19:27:29 +00:00
|
|
|
|
(property-drawer . org-ascii-property-drawer)
|
2013-03-19 15:24:40 +00:00
|
|
|
|
(quote-block . org-ascii-quote-block)
|
|
|
|
|
(radio-target . org-ascii-radio-target)
|
|
|
|
|
(section . org-ascii-section)
|
|
|
|
|
(special-block . org-ascii-special-block)
|
|
|
|
|
(src-block . org-ascii-src-block)
|
|
|
|
|
(statistics-cookie . org-ascii-statistics-cookie)
|
|
|
|
|
(strike-through . org-ascii-strike-through)
|
|
|
|
|
(subscript . org-ascii-subscript)
|
|
|
|
|
(superscript . org-ascii-superscript)
|
|
|
|
|
(table . org-ascii-table)
|
|
|
|
|
(table-cell . org-ascii-table-cell)
|
|
|
|
|
(table-row . org-ascii-table-row)
|
|
|
|
|
(target . org-ascii-target)
|
|
|
|
|
(template . org-ascii-template)
|
|
|
|
|
(timestamp . org-ascii-timestamp)
|
|
|
|
|
(underline . org-ascii-underline)
|
|
|
|
|
(verbatim . org-ascii-verbatim)
|
|
|
|
|
(verse-block . org-ascii-verse-block))
|
2012-07-23 12:06:13 +00:00
|
|
|
|
:export-block "ASCII"
|
2012-09-09 11:08:52 +00:00
|
|
|
|
:menu-entry
|
2013-03-19 15:24:40 +00:00
|
|
|
|
'(?t "Export to Plain Text"
|
|
|
|
|
((?A "As ASCII buffer"
|
|
|
|
|
(lambda (a s v b)
|
|
|
|
|
(org-ascii-export-as-ascii a s v b '(:ascii-charset ascii))))
|
|
|
|
|
(?a "As ASCII file"
|
|
|
|
|
(lambda (a s v b)
|
|
|
|
|
(org-ascii-export-to-ascii a s v b '(:ascii-charset ascii))))
|
|
|
|
|
(?L "As Latin1 buffer"
|
|
|
|
|
(lambda (a s v b)
|
|
|
|
|
(org-ascii-export-as-ascii a s v b '(:ascii-charset latin1))))
|
|
|
|
|
(?l "As Latin1 file"
|
|
|
|
|
(lambda (a s v b)
|
|
|
|
|
(org-ascii-export-to-ascii a s v b '(:ascii-charset latin1))))
|
|
|
|
|
(?U "As UTF-8 buffer"
|
|
|
|
|
(lambda (a s v b)
|
|
|
|
|
(org-ascii-export-as-ascii a s v b '(:ascii-charset utf-8))))
|
|
|
|
|
(?u "As UTF-8 file"
|
|
|
|
|
(lambda (a s v b)
|
|
|
|
|
(org-ascii-export-to-ascii a s v b '(:ascii-charset utf-8))))))
|
|
|
|
|
:filters-alist '((:filter-headline . org-ascii-filter-headline-blank-lines)
|
|
|
|
|
(:filter-parse-tree org-ascii-filter-paragraph-spacing
|
|
|
|
|
org-ascii-filter-comment-spacing)
|
|
|
|
|
(:filter-section . org-ascii-filter-headline-blank-lines))
|
2014-05-21 07:06:59 +00:00
|
|
|
|
:options-alist
|
|
|
|
|
'((:ascii-bullets nil nil org-ascii-bullets)
|
|
|
|
|
(:ascii-caption-above nil nil org-ascii-caption-above)
|
|
|
|
|
(:ascii-charset nil nil org-ascii-charset)
|
|
|
|
|
(:ascii-global-margin nil nil org-ascii-global-margin)
|
|
|
|
|
(:ascii-format-drawer-function nil nil org-ascii-format-drawer-function)
|
|
|
|
|
(:ascii-format-inlinetask-function
|
|
|
|
|
nil nil org-ascii-format-inlinetask-function)
|
|
|
|
|
(:ascii-headline-spacing nil nil org-ascii-headline-spacing)
|
|
|
|
|
(:ascii-indented-line-width nil nil org-ascii-indented-line-width)
|
|
|
|
|
(:ascii-inlinetask-width nil nil org-ascii-inlinetask-width)
|
|
|
|
|
(:ascii-inner-margin nil nil org-ascii-inner-margin)
|
|
|
|
|
(:ascii-links-to-notes nil nil org-ascii-links-to-notes)
|
|
|
|
|
(:ascii-paragraph-spacing nil nil org-ascii-paragraph-spacing)
|
|
|
|
|
(:ascii-quote-margin nil nil org-ascii-quote-margin)
|
|
|
|
|
(:ascii-table-keep-all-vertical-lines
|
|
|
|
|
nil nil org-ascii-table-keep-all-vertical-lines)
|
|
|
|
|
(:ascii-table-use-ascii-art nil nil org-ascii-table-use-ascii-art)
|
|
|
|
|
(:ascii-table-widen-columns nil nil org-ascii-table-widen-columns)
|
|
|
|
|
(:ascii-text-width nil nil org-ascii-text-width)
|
|
|
|
|
(:ascii-underline nil nil org-ascii-underline)
|
|
|
|
|
(:ascii-verbatim-format nil nil org-ascii-verbatim-format)))
|
2012-02-13 12:50:28 +00:00
|
|
|
|
|
2012-05-18 08:18:42 +00:00
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
;;; User Configurable Variables
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defgroup org-export-ascii nil
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Options for exporting Org mode files to ASCII."
|
|
|
|
|
:tag "Org Export ASCII"
|
|
|
|
|
:group 'org-export)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-text-width 72
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Maximum width of exported text.
|
|
|
|
|
This number includes margin size, as set in
|
2013-01-27 22:11:34 +00:00
|
|
|
|
`org-ascii-global-margin'."
|
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'integer)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-global-margin 0
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Width of the left margin, in number of characters."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'integer)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-inner-margin 2
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Width of the inner margin, in number of characters.
|
|
|
|
|
Inner margin is applied between each headline."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'integer)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-quote-margin 6
|
2012-01-28 12:51:41 +00:00
|
|
|
|
"Width of margin used for quoting text, in characters.
|
|
|
|
|
This margin is applied on both sides of the text."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-28 12:51:41 +00:00
|
|
|
|
:type 'integer)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-inlinetask-width 30
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Width of inline tasks, in number of characters.
|
|
|
|
|
This number ignores any margin."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'integer)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-headline-spacing '(1 . 2)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Number of blank lines inserted around headlines.
|
|
|
|
|
|
|
|
|
|
This variable can be set to a cons cell. In that case, its car
|
|
|
|
|
represents the number of blank lines present before headline
|
|
|
|
|
contents whereas its cdr reflects the number of blank lines after
|
|
|
|
|
contents.
|
|
|
|
|
|
|
|
|
|
A nil value replicates the number of blank lines found in the
|
|
|
|
|
original Org buffer at the same place."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type '(choice
|
|
|
|
|
(const :tag "Replicate original spacing" nil)
|
|
|
|
|
(cons :tag "Set an uniform spacing"
|
|
|
|
|
(integer :tag "Number of blank lines before contents")
|
|
|
|
|
(integer :tag "Number of blank lines after contents"))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-indented-line-width 'auto
|
2012-09-27 12:53:32 +00:00
|
|
|
|
"Additional indentation width for the first line in a paragraph.
|
|
|
|
|
If the value is an integer, indent the first line of each
|
2014-05-17 08:00:41 +00:00
|
|
|
|
paragraph by this width, unless it is located at the beginning of
|
|
|
|
|
a section, in which case indentation is removed from that line.
|
|
|
|
|
If it is the symbol `auto' preserve indentation from original
|
|
|
|
|
document."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-09-27 12:53:32 +00:00
|
|
|
|
:type '(choice
|
|
|
|
|
(integer :tag "Number of white spaces characters")
|
|
|
|
|
(const :tag "Preserve original width" auto)))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-paragraph-spacing 'auto
|
2012-09-27 12:53:32 +00:00
|
|
|
|
"Number of white lines between paragraphs.
|
|
|
|
|
If the value is an integer, add this number of blank lines
|
|
|
|
|
between contiguous paragraphs. If is it the symbol `auto', keep
|
|
|
|
|
the same number of blank lines as in the original document."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-09-27 12:53:32 +00:00
|
|
|
|
:type '(choice
|
|
|
|
|
(integer :tag "Number of blank lines")
|
|
|
|
|
(const :tag "Preserve original spacing" auto)))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-charset 'ascii
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"The charset allowed to represent various elements and objects.
|
|
|
|
|
Possible values are:
|
|
|
|
|
`ascii' Only use plain ASCII characters
|
|
|
|
|
`latin1' Include Latin-1 characters
|
|
|
|
|
`utf-8' Use all UTF-8 characters"
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type '(choice
|
|
|
|
|
(const :tag "ASCII" ascii)
|
|
|
|
|
(const :tag "Latin-1" latin1)
|
|
|
|
|
(const :tag "UTF-8" utf-8)))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-underline '((ascii ?= ?~ ?-)
|
2013-03-19 15:24:40 +00:00
|
|
|
|
(latin1 ?= ?~ ?-)
|
|
|
|
|
(utf-8 ?═ ?─ ?╌ ?┄ ?┈))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Characters for underlining headings in ASCII export.
|
|
|
|
|
|
|
|
|
|
Alist whose key is a symbol among `ascii', `latin1' and `utf-8'
|
|
|
|
|
and whose value is a list of characters.
|
|
|
|
|
|
|
|
|
|
For each supported charset, this variable associates a sequence
|
|
|
|
|
of underline characters. In a sequence, the characters will be
|
|
|
|
|
used in order for headlines level 1, 2, ... If no character is
|
|
|
|
|
available for a given level, the headline won't be underlined."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type '(list
|
|
|
|
|
(cons :tag "Underline characters sequence"
|
|
|
|
|
(const :tag "ASCII charset" ascii)
|
|
|
|
|
(repeat character))
|
|
|
|
|
(cons :tag "Underline characters sequence"
|
|
|
|
|
(const :tag "Latin-1 charset" latin1)
|
|
|
|
|
(repeat character))
|
|
|
|
|
(cons :tag "Underline characters sequence"
|
|
|
|
|
(const :tag "UTF-8 charset" utf-8)
|
|
|
|
|
(repeat character))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-bullets '((ascii ?* ?+ ?-)
|
|
|
|
|
(latin1 ?§ ?¶)
|
|
|
|
|
(utf-8 ?◊))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Bullet characters for headlines converted to lists in ASCII export.
|
|
|
|
|
|
|
|
|
|
Alist whose key is a symbol among `ascii', `latin1' and `utf-8'
|
|
|
|
|
and whose value is a list of characters.
|
|
|
|
|
|
|
|
|
|
The first character is used for the first level considered as low
|
|
|
|
|
level, and so on. If there are more levels than characters given
|
|
|
|
|
here, the list will be repeated.
|
|
|
|
|
|
|
|
|
|
Note that this variable doesn't affect plain lists
|
|
|
|
|
representation."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type '(list
|
|
|
|
|
(cons :tag "Bullet characters for low level headlines"
|
|
|
|
|
(const :tag "ASCII charset" ascii)
|
|
|
|
|
(repeat character))
|
|
|
|
|
(cons :tag "Bullet characters for low level headlines"
|
|
|
|
|
(const :tag "Latin-1 charset" latin1)
|
|
|
|
|
(repeat character))
|
|
|
|
|
(cons :tag "Bullet characters for low level headlines"
|
|
|
|
|
(const :tag "UTF-8 charset" utf-8)
|
|
|
|
|
(repeat character))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-links-to-notes t
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Non-nil means convert links to notes before the next headline.
|
|
|
|
|
When nil, the link will be exported in place. If the line
|
|
|
|
|
becomes long in this way, it will be wrapped."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-table-keep-all-vertical-lines nil
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Non-nil means keep all vertical lines in ASCII tables.
|
|
|
|
|
When nil, vertical lines will be removed except for those needed
|
|
|
|
|
for column grouping."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-table-widen-columns t
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Non-nil means widen narrowed columns for export.
|
|
|
|
|
When nil, narrowed columns will look in ASCII export just like in
|
|
|
|
|
Org mode, i.e. with \"=>\" as ellipsis."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-table-use-ascii-art nil
|
2012-07-31 14:30:44 +00:00
|
|
|
|
"Non-nil means table.el tables are turned into ascii-art.
|
|
|
|
|
|
|
|
|
|
It only makes sense when export charset is `utf-8'. It is nil by
|
|
|
|
|
default since it requires ascii-art-to-unicode.el package. You
|
|
|
|
|
can download it here:
|
|
|
|
|
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
http://gnuvola.org/software/j/aa2u/ascii-art-to-unicode.el."
|
|
|
|
|
:group 'org-export-ascii
|
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
|
|
|
|
:type 'boolean)
|
2012-07-31 14:30:44 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-caption-above nil
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"When non-nil, place caption string before the element.
|
|
|
|
|
Otherwise, place it right after it."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-ascii-verbatim-format "`%s'"
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Format string used for verbatim text and inline code."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'string)
|
|
|
|
|
|
2013-11-14 13:05:18 +00:00
|
|
|
|
(defcustom org-ascii-format-drawer-function
|
|
|
|
|
(lambda (name contents width) contents)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Function called to format a drawer in ASCII.
|
|
|
|
|
|
2012-11-05 14:44:46 +00:00
|
|
|
|
The function must accept three parameters:
|
2012-01-07 13:01:25 +00:00
|
|
|
|
NAME the drawer name, like \"LOGBOOK\"
|
|
|
|
|
CONTENTS the contents of the drawer.
|
|
|
|
|
WIDTH the text width within the drawer.
|
|
|
|
|
|
|
|
|
|
The function should return either the string to be exported or
|
|
|
|
|
nil to ignore the drawer.
|
|
|
|
|
|
2013-11-14 13:05:18 +00:00
|
|
|
|
The default value simply returns the value of CONTENTS."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'function)
|
|
|
|
|
|
2013-11-14 13:05:18 +00:00
|
|
|
|
(defcustom org-ascii-format-inlinetask-function
|
|
|
|
|
'org-ascii-format-inlinetask-default
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Function called to format an inlinetask in ASCII.
|
|
|
|
|
|
2013-11-14 13:05:18 +00:00
|
|
|
|
The function must accept nine parameters:
|
|
|
|
|
TODO the todo keyword, as a string
|
|
|
|
|
TODO-TYPE the todo type, a symbol among `todo', `done' and nil.
|
|
|
|
|
PRIORITY the inlinetask priority, as a string
|
|
|
|
|
NAME the inlinetask name, as a string.
|
|
|
|
|
TAGS the inlinetask tags, as a list of strings.
|
|
|
|
|
CONTENTS the contents of the inlinetask, as a string.
|
|
|
|
|
WIDTH the width of the inlinetask, as a number.
|
|
|
|
|
INLINETASK the inlinetask itself.
|
|
|
|
|
INFO the info channel.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
The function should return either the string to be exported or
|
2013-11-14 13:05:18 +00:00
|
|
|
|
nil to ignore the inline task."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-ascii
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
:version "24.4"
|
2013-11-14 13:05:18 +00:00
|
|
|
|
:package-version '(Org . "8.3")
|
2012-01-07 13:01:25 +00:00
|
|
|
|
:type 'function)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Internal Functions
|
|
|
|
|
|
|
|
|
|
;; Internal functions fall into three categories.
|
|
|
|
|
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
;; The first one is about text formatting. The core functions are
|
|
|
|
|
;; `org-ascii--current-text-width' and
|
|
|
|
|
;; `org-ascii--current-justification', which determine, respectively,
|
|
|
|
|
;; the current text width allowed to a given element and its expected
|
|
|
|
|
;; justification. Once this information is known,
|
|
|
|
|
;; `org-ascii--fill-string', `org-ascii--justify-lines',
|
|
|
|
|
;; `org-ascii--justify-element' `org-ascii--box-string' and
|
|
|
|
|
;; `org-ascii--indent-string' can operate on a given output string.
|
|
|
|
|
;; In particular, justification happens at the regular (i.e.,
|
|
|
|
|
;; non-greater) element level, which means that when the exporting
|
|
|
|
|
;; process reaches a container (e.g., a center block) content are
|
|
|
|
|
;; already justified.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
;; The second category contains functions handling elements listings,
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; triggered by "#+TOC:" keyword. As such, `org-ascii--build-toc'
|
|
|
|
|
;; returns a complete table of contents, `org-ascii--list-listings'
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; returns a list of referenceable src-block elements, and
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; `org-ascii--list-tables' does the same for table elements.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
;; The third category includes general helper functions.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; `org-ascii--build-title' creates the title for a given headline
|
|
|
|
|
;; or inlinetask element. `org-ascii--build-caption' returns the
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; caption string associated to a table or a src-block.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; `org-ascii--describe-links' creates notes about links for
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; insertion at the end of a section. It uses
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; `org-ascii--unique-links' to get the list of links to describe.
|
|
|
|
|
;; Eventually, `org-ascii--translate' translates a string according
|
2012-07-16 16:17:56 +00:00
|
|
|
|
;; to language and charset specification.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--fill-string (s text-width info &optional justify)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Fill a string with specified text-width and return it.
|
|
|
|
|
|
|
|
|
|
S is the string being filled. TEXT-WIDTH is an integer
|
|
|
|
|
specifying maximum length of a line. INFO is the plist used as
|
|
|
|
|
a communication channel.
|
|
|
|
|
|
|
|
|
|
Optional argument JUSTIFY can specify any type of justification
|
|
|
|
|
among `left', `center', `right' or `full'. A nil value is
|
|
|
|
|
equivalent to `left'. For a justification that doesn't also fill
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
string, see `org-ascii--justify-lines' and
|
|
|
|
|
`org-ascii--justify-block'.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
Return nil if S isn't a string."
|
|
|
|
|
;; Don't fill paragraph when break should be preserved.
|
|
|
|
|
(cond ((not (stringp s)) nil)
|
|
|
|
|
((plist-get info :preserve-breaks) s)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(t (let ((double-space-p sentence-end-double-space))
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(let ((fill-column text-width)
|
|
|
|
|
(use-hard-newlines t)
|
|
|
|
|
(sentence-end-double-space double-space-p))
|
|
|
|
|
(insert s)
|
|
|
|
|
(fill-region (point-min) (point-max) justify))
|
|
|
|
|
(buffer-string))))))
|
|
|
|
|
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(defun org-ascii--justify-lines (s text-width how)
|
|
|
|
|
"Justify all lines in string S.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
TEXT-WIDTH is an integer specifying maximum length of a line.
|
|
|
|
|
HOW determines the type of justification: it can be `left',
|
|
|
|
|
`right', `full' or `center'."
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(insert s)
|
|
|
|
|
(goto-char (point-min))
|
2013-02-01 22:47:00 +00:00
|
|
|
|
(let ((fill-column text-width)
|
|
|
|
|
;; Disable `adaptive-fill-mode' so it doesn't prevent
|
|
|
|
|
;; filling lines matching `adaptive-fill-regexp'.
|
|
|
|
|
(adaptive-fill-mode nil))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(while (< (point) (point-max))
|
|
|
|
|
(justify-current-line how)
|
|
|
|
|
(forward-line)))
|
|
|
|
|
(buffer-string)))
|
|
|
|
|
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(defun org-ascii--justify-element (contents element info)
|
|
|
|
|
"Justify CONTENTS of ELEMENT.
|
|
|
|
|
INFO is a plist used as a communication channel. Justification
|
|
|
|
|
is done according to the type of element. More accurately,
|
|
|
|
|
paragraphs are filled and other elements are justified as blocks,
|
|
|
|
|
that is according to the widest non blank line in CONTENTS."
|
|
|
|
|
(if (not (org-string-nw-p contents)) contents
|
|
|
|
|
(let ((text-width (org-ascii--current-text-width element info))
|
|
|
|
|
(how (org-ascii--current-justification element)))
|
|
|
|
|
(if (eq how 'left) contents
|
|
|
|
|
;; Paragraphs are treated specially as they also need to be
|
|
|
|
|
;; filled.
|
|
|
|
|
(if (eq (org-element-type element) 'paragraph)
|
|
|
|
|
(org-ascii--fill-string contents text-width info how)
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(insert contents)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(catch 'exit
|
|
|
|
|
(let ((max-width 0))
|
|
|
|
|
;; Compute maximum width. Bail out if it is greater
|
|
|
|
|
;; than page width, since no justification is
|
|
|
|
|
;; possible.
|
|
|
|
|
(save-excursion
|
|
|
|
|
(while (not (eobp))
|
|
|
|
|
(unless (org-looking-at-p "[ \t]*$")
|
|
|
|
|
(end-of-line)
|
|
|
|
|
(let ((column (current-column)))
|
|
|
|
|
(cond
|
|
|
|
|
((>= column text-width) (throw 'exit contents))
|
|
|
|
|
((> column max-width) (setq max-width column)))))
|
|
|
|
|
(forward-line)))
|
|
|
|
|
;; Justify every line according to TEXT-WIDTH and
|
|
|
|
|
;; MAX-WIDTH.
|
|
|
|
|
(let ((offset (/ (- text-width max-width)
|
|
|
|
|
(if (eq how 'right) 1 2))))
|
|
|
|
|
(if (zerop offset) (throw 'exit contents)
|
|
|
|
|
(while (not (eobp))
|
|
|
|
|
(unless (org-looking-at-p "[ \t]*$")
|
|
|
|
|
(org-indent-to-column offset))
|
|
|
|
|
(forward-line)))))
|
|
|
|
|
(buffer-string))))))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--indent-string (s width)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Indent string S by WIDTH white spaces.
|
|
|
|
|
Empty lines are not indented."
|
|
|
|
|
(when (stringp s)
|
|
|
|
|
(replace-regexp-in-string
|
2014-04-28 14:48:07 +00:00
|
|
|
|
"\\(^\\)[ \t]*\\S-" (make-string width ?\s) s nil nil 1)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--box-string (s info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return string S with a partial box to its left.
|
2013-11-17 08:12:41 +00:00
|
|
|
|
INFO is a plist used as a communication channel."
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)))
|
|
|
|
|
(format (if utf8p "╭────\n%s\n╰────" ",----\n%s\n`----")
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"^" (if utf8p "│ " "| ")
|
|
|
|
|
;; Remove last newline character.
|
|
|
|
|
(replace-regexp-in-string "\n[ \t]*\\'" "" s)))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--current-text-width (element info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return maximum text width for ELEMENT's contents.
|
|
|
|
|
INFO is a plist used as a communication channel."
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(case (org-element-type element)
|
|
|
|
|
;; Elements with an absolute width: `headline' and `inlinetask'.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(inlinetask org-ascii-inlinetask-width)
|
2014-05-24 13:44:08 +00:00
|
|
|
|
(headline
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(- org-ascii-text-width
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(let ((low-level-rank (org-export-low-level-p element info)))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(if low-level-rank (* low-level-rank 2) org-ascii-global-margin))))
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
;; Elements with a relative width: store maximum text width in
|
|
|
|
|
;; TOTAL-WIDTH.
|
|
|
|
|
(otherwise
|
org-export: Rewrite topology functions
* contrib/lisp/org-export.el (org-export-get-genealogy,
org-export-get-parent, org-export-get-parent-headline,
org-export-get-parent-table): Rewrite function to use :parent
property. Remove communication channel from signature.
(org-export-get-parent-element): Rename from
`org-export-get-parent-paragraph'.
(org-export-data, org-export-table-row-is-special-p)
org-export-table-row-group, org-export-table-cell-starts-colgroup-p,
org-export-table-cell-ends-colgroup-p,
org-export-table-row-starts-header-p,
org-export-table-row-ends-header-p, org-export-table-cell-address,
org-export-first-sibling-p, org-export-last-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal): Apply
signature change.
(org-export--skip-p, org-export-table-cell-width,
org-export-table-cell-alignment, org-export-table-cell-borders):
Refactor code. Apply signature change.
* contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--unique-links, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-section, org-e-ascii--table-cell-width): Apply signature
change.
* contrib/lisp/org-e-html.el (org-e-html-link,
org-e-html-link--inline-image): Use new function and apply signature
change.
(org-e-html-item, org-e-html-standalone-image-p, org-e-html-paragraph,
org-e-html-section, org-e-html-table-cell, org-e-html-table-row,
org-e-html-footnote-reference): Apply signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-link--inline-image): Use
new function and apply signature change.
(org-e-latex-footnote-reference, org-e-latex-item,
org-e-latex-table-cell, org-e-latex-table-row): Apply signature
change.
* contrib/lisp/org-e-odt.el (org-e-odt-format-formula,
org-e-odt-format-label, org-e-odt-link--inline-image): Use new
function and apply signature change.
(org-e-odt-item, org-e-odt-standalone-image-p, org-e-odt-paragraph,
org-e-odt-plain-list, org-e-odt-table-style-spec,
org-e-odt-get-table-cell-styles, org-e-odt-table-cell,
org-e-odt-table-row, org-e-odt-table, org-e-odt-footnote-reference,
org-e-odt-enumerate-element): Apply signature change.
2012-06-08 19:00:47 +00:00
|
|
|
|
(let* ((genealogy (cons element (org-export-get-genealogy element)))
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
;; Total width is determined by the presence, or not, of an
|
|
|
|
|
;; inline task among ELEMENT parents.
|
|
|
|
|
(total-width
|
|
|
|
|
(if (loop for parent in genealogy
|
|
|
|
|
thereis (eq (org-element-type parent) 'inlinetask))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-ascii-inlinetask-width
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
;; No inlinetask: Remove global margin from text width.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(- org-ascii-text-width
|
|
|
|
|
org-ascii-global-margin
|
org-export: Rewrite topology functions
* contrib/lisp/org-export.el (org-export-get-genealogy,
org-export-get-parent, org-export-get-parent-headline,
org-export-get-parent-table): Rewrite function to use :parent
property. Remove communication channel from signature.
(org-export-get-parent-element): Rename from
`org-export-get-parent-paragraph'.
(org-export-data, org-export-table-row-is-special-p)
org-export-table-row-group, org-export-table-cell-starts-colgroup-p,
org-export-table-cell-ends-colgroup-p,
org-export-table-row-starts-header-p,
org-export-table-row-ends-header-p, org-export-table-cell-address,
org-export-first-sibling-p, org-export-last-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal): Apply
signature change.
(org-export--skip-p, org-export-table-cell-width,
org-export-table-cell-alignment, org-export-table-cell-borders):
Refactor code. Apply signature change.
* contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--unique-links, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-section, org-e-ascii--table-cell-width): Apply signature
change.
* contrib/lisp/org-e-html.el (org-e-html-link,
org-e-html-link--inline-image): Use new function and apply signature
change.
(org-e-html-item, org-e-html-standalone-image-p, org-e-html-paragraph,
org-e-html-section, org-e-html-table-cell, org-e-html-table-row,
org-e-html-footnote-reference): Apply signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-link--inline-image): Use
new function and apply signature change.
(org-e-latex-footnote-reference, org-e-latex-item,
org-e-latex-table-cell, org-e-latex-table-row): Apply signature
change.
* contrib/lisp/org-e-odt.el (org-e-odt-format-formula,
org-e-odt-format-label, org-e-odt-link--inline-image): Use new
function and apply signature change.
(org-e-odt-item, org-e-odt-standalone-image-p, org-e-odt-paragraph,
org-e-odt-plain-list, org-e-odt-table-style-spec,
org-e-odt-get-table-cell-styles, org-e-odt-table-cell,
org-e-odt-table-row, org-e-odt-table, org-e-odt-footnote-reference,
org-e-odt-enumerate-element): Apply signature change.
2012-06-08 19:00:47 +00:00
|
|
|
|
(let ((parent (org-export-get-parent-headline element)))
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
;; Inner margin doesn't apply to text before first
|
|
|
|
|
;; headline.
|
|
|
|
|
(if (not parent) 0
|
|
|
|
|
(let ((low-level-rank
|
|
|
|
|
(org-export-low-level-p parent info)))
|
|
|
|
|
;; Inner margin doesn't apply to contents of
|
|
|
|
|
;; low level headlines, since they've got their
|
|
|
|
|
;; own indentation mechanism.
|
|
|
|
|
(if low-level-rank (* low-level-rank 2)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-ascii-inner-margin))))))))
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(- total-width
|
2014-01-26 13:23:32 +00:00
|
|
|
|
;; Each `quote-block' and `verse-block' above narrows text
|
|
|
|
|
;; width by twice the standard margin size.
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(+ (* (loop for parent in genealogy
|
|
|
|
|
when (memq (org-element-type parent)
|
2014-01-26 13:23:32 +00:00
|
|
|
|
'(quote-block verse-block))
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
count parent)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
2 org-ascii-quote-margin)
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
;; Text width within a plain-list is restricted by
|
|
|
|
|
;; indentation of current item. If that's the case,
|
|
|
|
|
;; compute it with the help of `:structure' property from
|
|
|
|
|
;; parent item, if any.
|
|
|
|
|
(let ((parent-item
|
|
|
|
|
(if (eq (org-element-type element) 'item) element
|
|
|
|
|
(loop for parent in genealogy
|
|
|
|
|
when (eq (org-element-type parent) 'item)
|
|
|
|
|
return parent))))
|
|
|
|
|
(if (not parent-item) 0
|
|
|
|
|
;; Compute indentation offset of the current item,
|
|
|
|
|
;; that is the sum of the difference between its
|
|
|
|
|
;; indentation and the indentation of the top item in
|
|
|
|
|
;; the list and current item bullet's length. Also
|
2012-06-09 13:34:27 +00:00
|
|
|
|
;; remove checkbox length, and tag length (for
|
|
|
|
|
;; description lists) or bullet length.
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(let ((struct (org-element-property :structure parent-item))
|
|
|
|
|
(beg-item (org-element-property :begin parent-item)))
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(+ (- (org-list-get-ind beg-item struct)
|
|
|
|
|
(org-list-get-ind
|
|
|
|
|
(org-list-get-top-point struct) struct))
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(string-width (or (org-ascii--checkbox parent-item info)
|
|
|
|
|
""))
|
|
|
|
|
(string-width
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(or (org-list-get-tag beg-item struct)
|
|
|
|
|
(org-list-get-bullet beg-item struct)))))))))))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(defun org-ascii--current-justification (element)
|
|
|
|
|
"Return expected justification for ELEMENT's contents.
|
|
|
|
|
Return value is a symbol among `left', `center', `right' and
|
|
|
|
|
`full'."
|
|
|
|
|
(let (justification)
|
|
|
|
|
(while (and (not justification)
|
|
|
|
|
(setq element (org-element-property :parent element)))
|
|
|
|
|
(case (org-element-type element)
|
|
|
|
|
(center-block (setq justification 'center))
|
|
|
|
|
(special-block
|
|
|
|
|
(let ((name (org-element-property :type element)))
|
|
|
|
|
(cond ((string= name "JUSTIFYRIGHT") (setq justification 'right))
|
|
|
|
|
((string= name "JUSTIFYLEFT") (setq justification 'left)))))))
|
|
|
|
|
(or justification 'left)))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--build-title
|
2013-02-23 21:02:37 +00:00
|
|
|
|
(element info text-width &optional underline notags toc)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Format ELEMENT title and return it.
|
|
|
|
|
|
|
|
|
|
ELEMENT is either an `headline' or `inlinetask' element. INFO is
|
|
|
|
|
a plist used as a communication channel. TEXT-WIDTH is an
|
|
|
|
|
integer representing the maximum length of a line.
|
|
|
|
|
|
|
|
|
|
When optional argument UNDERLINE is non-nil, underline title,
|
2013-01-27 22:11:34 +00:00
|
|
|
|
without the tags, according to `org-ascii-underline'
|
2012-01-07 13:01:25 +00:00
|
|
|
|
specifications.
|
|
|
|
|
|
2013-02-23 21:02:37 +00:00
|
|
|
|
If optional argument NOTAGS is non-nil, no tags will be added to
|
|
|
|
|
the title.
|
|
|
|
|
|
|
|
|
|
When optional argument TOC is non-nil, use optional title if
|
2013-02-24 08:15:26 +00:00
|
|
|
|
possible. It doesn't apply to `inlinetask' elements."
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(let* ((headlinep (eq (org-element-type element) 'headline))
|
2012-01-27 13:49:32 +00:00
|
|
|
|
(numbers
|
|
|
|
|
;; Numbering is specific to headlines.
|
2012-02-29 18:05:45 +00:00
|
|
|
|
(and headlinep (org-export-numbered-headline-p element info)
|
2012-01-27 13:49:32 +00:00
|
|
|
|
;; All tests passed: build numbering string.
|
|
|
|
|
(concat
|
|
|
|
|
(mapconcat
|
org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 12:10:12 +00:00
|
|
|
|
'number-to-string
|
2012-01-27 13:49:32 +00:00
|
|
|
|
(org-export-get-headline-number element info) ".")
|
|
|
|
|
" ")))
|
2013-02-23 21:02:37 +00:00
|
|
|
|
(text
|
|
|
|
|
(org-trim
|
|
|
|
|
(org-export-data
|
2013-02-26 23:00:33 +00:00
|
|
|
|
(if (and toc headlinep) (org-export-get-alt-title element info)
|
2013-02-24 08:15:26 +00:00
|
|
|
|
(org-element-property :title element))
|
|
|
|
|
info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(todo
|
|
|
|
|
(and (plist-get info :with-todo-keywords)
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(let ((todo (org-element-property :todo-keyword element)))
|
org-export: Secondary strings are transcoded with `org-export-data'
* contrib/lisp/org-export.el (org-export-transcoder): New function.
(org-export-data): Also export secondary strings. Refactored.
(org-export-secondary-string): Remove function.
(org-export-expand): Fix code indentation.
(org-export-expand-macro): Use `org-export-data' instead of
`org-export-secondary-string'.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii--build-caption, org-e-ascii--list-listings,
org-e-ascii--list-tables, org-e-ascii--describe-links,
org-e-ascii-template--document-title, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section,
org-e-ascii--table-cell-width): Use `org-export-data' instead of
`org-export-secondary-string'.
* contrib/lisp/org-e-html.el (org-e-html-footnote-section,
org-e-html--caption/label-string, org-e-html-meta-info,
org-e-html-preamble, org-e-html-template,
org-e-html-format-headline--wrap, org-e-html-headline,
org-e-html-item, org-e-html-link): Use `org-export-data' instead of
`org-export-secondary-string'.
* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string,
org-e-latex-template, org-e-latex-footnote-reference,
org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item,
org-e-latex-link, org-e-latex-src-block): Use `org-export-data'
instead of `org-export-secondary-string'.
* contrib/lisp/org-e-odt.el (org-e-odt-format-preamble,
org-e-odt-format-label, org-e-odt-update-meta-file,
org-e-odt--caption/label-string, org-e-odt-footnote-def,
org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item,
org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block):
Use `org-export-data' instead of `org-export-secondary-string'.
2012-04-30 00:04:03 +00:00
|
|
|
|
(and todo (concat (org-export-data todo info) " ")))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(tags (and (not notags)
|
|
|
|
|
(plist-get info :with-tags)
|
2012-05-26 11:44:13 +00:00
|
|
|
|
(let ((tag-list (org-export-get-tags element info)))
|
org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 12:10:12 +00:00
|
|
|
|
(and tag-list
|
|
|
|
|
(format ":%s:"
|
|
|
|
|
(mapconcat 'identity tag-list ":"))))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(priority
|
|
|
|
|
(and (plist-get info :with-priority)
|
2012-07-27 22:44:07 +00:00
|
|
|
|
(let ((char (org-element-property :priority element)))
|
|
|
|
|
(and char (format "(#%c) " char)))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(first-part (concat numbers todo priority text)))
|
|
|
|
|
(concat
|
|
|
|
|
first-part
|
|
|
|
|
;; Align tags, if any.
|
|
|
|
|
(when tags
|
|
|
|
|
(format
|
|
|
|
|
(format " %%%ds"
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(max (- text-width (1+ (string-width first-part)))
|
|
|
|
|
(string-width tags)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
tags))
|
2012-01-27 13:49:32 +00:00
|
|
|
|
;; Maybe underline text, if ELEMENT type is `headline' and an
|
|
|
|
|
;; underline character has been defined.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(when (and underline headlinep)
|
|
|
|
|
(let ((under-char
|
|
|
|
|
(nth (1- (org-export-get-relative-level element info))
|
|
|
|
|
(cdr (assq (plist-get info :ascii-charset)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-ascii-underline)))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(and under-char
|
|
|
|
|
(concat "\n"
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(make-string (/ (string-width first-part)
|
|
|
|
|
(char-width under-char))
|
|
|
|
|
under-char))))))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--has-caption-p (element info)
|
2012-05-21 19:38:42 +00:00
|
|
|
|
"Non-nil when ELEMENT has a caption affiliated keyword.
|
|
|
|
|
INFO is a plist used as a communication channel. This function
|
|
|
|
|
is meant to be used as a predicate for `org-export-get-ordinal'."
|
|
|
|
|
(org-element-property :caption element))
|
2012-05-20 11:57:58 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--build-caption (element info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return caption string for ELEMENT, if applicable.
|
|
|
|
|
|
|
|
|
|
INFO is a plist used as a communication channel.
|
|
|
|
|
|
2012-05-21 19:38:42 +00:00
|
|
|
|
The caption string contains the sequence number of ELEMENT along
|
|
|
|
|
with its real caption. Return nil when ELEMENT has no affiliated
|
|
|
|
|
caption keyword."
|
2012-09-13 14:56:15 +00:00
|
|
|
|
(let ((caption (org-export-get-caption element)))
|
2012-05-21 19:38:42 +00:00
|
|
|
|
(when caption
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Get sequence number of current src-block among every
|
2012-05-21 19:38:42 +00:00
|
|
|
|
;; src-block with a caption.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(let ((reference
|
|
|
|
|
(org-export-get-ordinal
|
2013-01-27 22:11:34 +00:00
|
|
|
|
element info nil 'org-ascii--has-caption-p))
|
|
|
|
|
(title-fmt (org-ascii--translate
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(case (org-element-type element)
|
2013-06-25 07:29:18 +00:00
|
|
|
|
(table "Table %d:")
|
|
|
|
|
(src-block "Listing %d:"))
|
2012-05-21 19:38:42 +00:00
|
|
|
|
info)))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--fill-string
|
2013-06-25 07:29:18 +00:00
|
|
|
|
(concat (format title-fmt reference)
|
|
|
|
|
" "
|
|
|
|
|
(org-export-data caption info))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--current-text-width element info) info)))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--build-toc (info &optional n keyword)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return a table of contents.
|
|
|
|
|
|
|
|
|
|
INFO is a plist used as a communication channel.
|
|
|
|
|
|
|
|
|
|
Optional argument N, when non-nil, is an integer specifying the
|
|
|
|
|
depth of the table.
|
|
|
|
|
|
|
|
|
|
Optional argument KEYWORD specifies the TOC keyword, if any, from
|
|
|
|
|
which the table of contents generation has been initiated."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((title (org-ascii--translate "Table of Contents" info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(concat
|
2012-07-12 11:20:09 +00:00
|
|
|
|
title "\n"
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(make-string (string-width title)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_))
|
|
|
|
|
"\n\n"
|
|
|
|
|
(let ((text-width
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(if keyword (org-ascii--current-text-width keyword info)
|
|
|
|
|
(- org-ascii-text-width org-ascii-global-margin))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (headline)
|
|
|
|
|
(let* ((level (org-export-get-relative-level headline info))
|
|
|
|
|
(indent (* (1- level) 3)))
|
|
|
|
|
(concat
|
|
|
|
|
(unless (zerop indent) (concat (make-string (1- indent) ?.) " "))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--build-title
|
2012-01-07 13:01:25 +00:00
|
|
|
|
headline info (- text-width indent) nil
|
2013-02-23 21:02:37 +00:00
|
|
|
|
(or (not (plist-get info :with-tags))
|
|
|
|
|
(eq (plist-get info :with-tags) 'not-in-toc))
|
|
|
|
|
'toc))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(org-export-collect-headlines info n) "\n")))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--list-listings (keyword info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return a list of listings.
|
|
|
|
|
|
|
|
|
|
KEYWORD is the keyword that initiated the list of listings
|
|
|
|
|
generation. INFO is a plist used as a communication channel."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((title (org-ascii--translate "List of Listings" info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(concat
|
2012-07-12 11:20:09 +00:00
|
|
|
|
title "\n"
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(make-string (string-width title)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_))
|
|
|
|
|
"\n\n"
|
|
|
|
|
(let ((text-width
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(if keyword (org-ascii--current-text-width keyword info)
|
|
|
|
|
(- org-ascii-text-width org-ascii-global-margin)))
|
2013-11-17 08:12:41 +00:00
|
|
|
|
;; Use a counter instead of retrieving ordinal of each
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; src-block.
|
|
|
|
|
(count 0))
|
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (src-block)
|
|
|
|
|
;; 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).
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(let* ((initial-text
|
|
|
|
|
(format (org-ascii--translate "Listing %d:" info)
|
|
|
|
|
(incf count)))
|
|
|
|
|
(initial-width (string-width initial-text)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(concat
|
2012-07-12 11:20:09 +00:00
|
|
|
|
initial-text " "
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(org-trim
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--indent-string
|
|
|
|
|
(org-ascii--fill-string
|
2012-09-13 14:56:15 +00:00
|
|
|
|
;; Use short name in priority, if available.
|
|
|
|
|
(let ((caption (or (org-export-get-caption src-block t)
|
|
|
|
|
(org-export-get-caption src-block))))
|
|
|
|
|
(org-export-data caption info))
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(- text-width initial-width) info)
|
|
|
|
|
initial-width)))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(org-export-collect-listings info) "\n")))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--list-tables (keyword info)
|
2013-02-24 15:16:54 +00:00
|
|
|
|
"Return a list of tables.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-02-24 15:16:54 +00:00
|
|
|
|
KEYWORD is the keyword that initiated the list of tables
|
2012-01-07 13:01:25 +00:00
|
|
|
|
generation. INFO is a plist used as a communication channel."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((title (org-ascii--translate "List of Tables" info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(concat
|
2012-07-12 11:20:09 +00:00
|
|
|
|
title "\n"
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(make-string (string-width title)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_))
|
|
|
|
|
"\n\n"
|
|
|
|
|
(let ((text-width
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(if keyword (org-ascii--current-text-width keyword info)
|
|
|
|
|
(- org-ascii-text-width org-ascii-global-margin)))
|
2013-11-17 08:12:41 +00:00
|
|
|
|
;; Use a counter instead of retrieving ordinal of each
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; 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).
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(let* ((initial-text
|
|
|
|
|
(format (org-ascii--translate "Table %d:" info)
|
|
|
|
|
(incf count)))
|
|
|
|
|
(initial-width (string-width initial-text)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(concat
|
2012-07-12 11:20:09 +00:00
|
|
|
|
initial-text " "
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(org-trim
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--indent-string
|
|
|
|
|
(org-ascii--fill-string
|
2012-09-13 14:56:15 +00:00
|
|
|
|
;; 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))
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(- text-width initial-width) info)
|
|
|
|
|
initial-width)))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(org-export-collect-tables info) "\n")))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--unique-links (element info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return a list of unique link references in ELEMENT.
|
2013-02-23 12:47:44 +00:00
|
|
|
|
ELEMENT is either a headline element or a section element. INFO
|
2012-05-21 19:54:09 +00:00
|
|
|
|
is a plist used as a communication channel."
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(let* (seen
|
|
|
|
|
(unique-link-p
|
|
|
|
|
(function
|
|
|
|
|
;; Return LINK if it wasn't referenced so far, or nil.
|
|
|
|
|
;; Update SEEN links along the way.
|
|
|
|
|
(lambda (link)
|
|
|
|
|
(let ((footprint
|
2014-04-03 20:48:25 +00:00
|
|
|
|
;; Normalize description in footprints.
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(cons (org-element-property :raw-link link)
|
2014-04-03 20:48:25 +00:00
|
|
|
|
(let ((contents (org-element-contents link)))
|
|
|
|
|
(and contents
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"[ \r\t\n]+" " "
|
|
|
|
|
(org-trim
|
|
|
|
|
(org-element-interpret-data contents))))))))
|
2012-09-30 21:56:00 +00:00
|
|
|
|
;; Ignore LINK if it hasn't been translated already.
|
|
|
|
|
;; It can happen if it is located in an affiliated
|
|
|
|
|
;; keyword that was ignored.
|
|
|
|
|
(when (and (org-string-nw-p
|
|
|
|
|
(gethash link (plist-get info :exported-data)))
|
|
|
|
|
(not (member footprint seen)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(push footprint seen) link)))))
|
2012-05-21 19:54:09 +00:00
|
|
|
|
;; If at a section, find parent headline, if any, in order to
|
|
|
|
|
;; count links that might be in the title.
|
|
|
|
|
(headline
|
|
|
|
|
(if (eq (org-element-type element) 'headline) element
|
org-export: Rewrite topology functions
* contrib/lisp/org-export.el (org-export-get-genealogy,
org-export-get-parent, org-export-get-parent-headline,
org-export-get-parent-table): Rewrite function to use :parent
property. Remove communication channel from signature.
(org-export-get-parent-element): Rename from
`org-export-get-parent-paragraph'.
(org-export-data, org-export-table-row-is-special-p)
org-export-table-row-group, org-export-table-cell-starts-colgroup-p,
org-export-table-cell-ends-colgroup-p,
org-export-table-row-starts-header-p,
org-export-table-row-ends-header-p, org-export-table-cell-address,
org-export-first-sibling-p, org-export-last-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal): Apply
signature change.
(org-export--skip-p, org-export-table-cell-width,
org-export-table-cell-alignment, org-export-table-cell-borders):
Refactor code. Apply signature change.
* contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--unique-links, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-section, org-e-ascii--table-cell-width): Apply signature
change.
* contrib/lisp/org-e-html.el (org-e-html-link,
org-e-html-link--inline-image): Use new function and apply signature
change.
(org-e-html-item, org-e-html-standalone-image-p, org-e-html-paragraph,
org-e-html-section, org-e-html-table-cell, org-e-html-table-row,
org-e-html-footnote-reference): Apply signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-link--inline-image): Use
new function and apply signature change.
(org-e-latex-footnote-reference, org-e-latex-item,
org-e-latex-table-cell, org-e-latex-table-row): Apply signature
change.
* contrib/lisp/org-e-odt.el (org-e-odt-format-formula,
org-e-odt-format-label, org-e-odt-link--inline-image): Use new
function and apply signature change.
(org-e-odt-item, org-e-odt-standalone-image-p, org-e-odt-paragraph,
org-e-odt-plain-list, org-e-odt-table-style-spec,
org-e-odt-get-table-cell-styles, org-e-odt-table-cell,
org-e-odt-table-row, org-e-odt-table, org-e-odt-footnote-reference,
org-e-odt-enumerate-element): Apply signature change.
2012-06-08 19:00:47 +00:00
|
|
|
|
(or (org-export-get-parent-headline element) element))))
|
2012-05-21 19:54:09 +00:00
|
|
|
|
;; Get all links in HEADLINE.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-element-map headline 'link
|
|
|
|
|
(lambda (l) (funcall unique-link-p l)) info nil nil t)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--describe-links (links width info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return a string describing a list of links.
|
|
|
|
|
|
|
|
|
|
LINKS is a list of link type objects, as returned by
|
2013-01-27 22:11:34 +00:00
|
|
|
|
`org-ascii--unique-links'. WIDTH is the text width allowed for
|
2012-01-07 13:01:25 +00:00
|
|
|
|
the output string. INFO is a plist used as a communication
|
|
|
|
|
channel."
|
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (link)
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(let ((type (org-element-property :type link))
|
|
|
|
|
(anchor (let ((desc (org-element-contents link)))
|
2012-09-30 21:56:00 +00:00
|
|
|
|
(if desc (org-export-data desc info)
|
|
|
|
|
(org-element-property :raw-link link)))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(cond
|
2012-02-20 21:24:38 +00:00
|
|
|
|
;; Coderefs, radio links and fuzzy links are ignored.
|
|
|
|
|
((member type '("coderef" "radio" "fuzzy")) nil)
|
|
|
|
|
;; Id and custom-id links: Headlines refer to their numbering.
|
|
|
|
|
((member type '("custom-id" "id"))
|
|
|
|
|
(let ((dest (org-export-resolve-id-link link info)))
|
|
|
|
|
(concat
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--fill-string
|
2012-02-20 21:24:38 +00:00
|
|
|
|
(format
|
|
|
|
|
"[%s] %s"
|
|
|
|
|
anchor
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(if (not dest) (org-ascii--translate "Unknown reference" info)
|
2012-02-20 21:24:38 +00:00
|
|
|
|
(format
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--translate "See section %s" info)
|
2012-02-20 21:24:38 +00:00
|
|
|
|
(mapconcat 'number-to-string
|
|
|
|
|
(org-export-get-headline-number dest info) "."))))
|
|
|
|
|
width info) "\n\n")))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Do not add a link that cannot be resolved and doesn't have
|
|
|
|
|
;; any description: destination is already visible in the
|
|
|
|
|
;; paragraph.
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
((not (org-element-contents link)) nil)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(t
|
|
|
|
|
(concat
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--fill-string
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(format "[%s] %s" anchor (org-element-property :raw-link link))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
width info)
|
|
|
|
|
"\n\n")))))
|
|
|
|
|
links ""))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--checkbox (item info)
|
2012-06-09 13:34:27 +00:00
|
|
|
|
"Return checkbox string for ITEM or nil.
|
|
|
|
|
INFO is a plist used as a communication channel."
|
|
|
|
|
(let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)))
|
|
|
|
|
(case (org-element-property :checkbox item)
|
|
|
|
|
(on (if utf8p "☑ " "[X] "))
|
|
|
|
|
(off (if utf8p "☐ " "[ ] "))
|
|
|
|
|
(trans (if utf8p "☒ " "[-] ")))))
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Template
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-template--document-title (info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return document title, as a string.
|
|
|
|
|
INFO is a plist used as a communication channel."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let* ((text-width org-ascii-text-width)
|
2012-09-30 21:56:00 +00:00
|
|
|
|
;; Links in the title will not be resolved later, so we make
|
|
|
|
|
;; sure their path is located right after them.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii-links-to-notes nil)
|
2012-09-30 21:56:00 +00:00
|
|
|
|
(title (org-export-data (plist-get info :title) info))
|
|
|
|
|
(author (and (plist-get info :with-author)
|
|
|
|
|
(let ((auth (plist-get info :author)))
|
|
|
|
|
(and auth (org-export-data auth info)))))
|
|
|
|
|
(email (and (plist-get info :with-email)
|
|
|
|
|
(org-export-data (plist-get info :email) info)))
|
2012-11-09 10:04:07 +00:00
|
|
|
|
(date (and (plist-get info :with-date)
|
2013-04-02 21:59:00 +00:00
|
|
|
|
(org-export-data (org-export-get-date info) info))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; There are two types of title blocks depending on the presence
|
|
|
|
|
;; of a title to display.
|
|
|
|
|
(if (string= title "")
|
|
|
|
|
;; Title block without a title. DATE is positioned at the top
|
|
|
|
|
;; right of the document, AUTHOR to the top left and EMAIL
|
|
|
|
|
;; just below.
|
|
|
|
|
(cond
|
|
|
|
|
((and (org-string-nw-p date) (org-string-nw-p author))
|
|
|
|
|
(concat
|
|
|
|
|
author
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(make-string (- text-width (string-width date) (string-width author))
|
|
|
|
|
?\s)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
date
|
|
|
|
|
(when (org-string-nw-p email) (concat "\n" email))
|
|
|
|
|
"\n\n\n"))
|
|
|
|
|
((and (org-string-nw-p date) (org-string-nw-p email))
|
|
|
|
|
(concat
|
|
|
|
|
email
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(make-string (- text-width (string-width date) (string-width email))
|
|
|
|
|
?\s)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
date "\n\n\n"))
|
|
|
|
|
((org-string-nw-p date)
|
|
|
|
|
(concat
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-lines date text-width 'right)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"\n\n\n"))
|
|
|
|
|
((and (org-string-nw-p author) (org-string-nw-p email))
|
|
|
|
|
(concat author "\n" email "\n\n\n"))
|
|
|
|
|
((org-string-nw-p author) (concat author "\n\n\n"))
|
|
|
|
|
((org-string-nw-p email) (concat email "\n\n\n")))
|
|
|
|
|
;; Title block with a title. Document's TITLE, along with the
|
|
|
|
|
;; AUTHOR and its EMAIL are both overlined and an underlined,
|
|
|
|
|
;; centered. Date is just below, also centered.
|
|
|
|
|
(let* ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))
|
|
|
|
|
;; Format TITLE. It may be filled if it is too wide,
|
|
|
|
|
;; that is wider than the two thirds of the total width.
|
|
|
|
|
(title-len (min (length title) (/ (* 2 text-width) 3)))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(formatted-title (org-ascii--fill-string title title-len info))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(line
|
|
|
|
|
(make-string
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(min (+ (max title-len
|
|
|
|
|
(string-width (or author ""))
|
|
|
|
|
(string-width (or email "")))
|
|
|
|
|
2)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
text-width) (if utf8p ?━ ?_))))
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-lines
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(concat line "\n"
|
|
|
|
|
(unless utf8p "\n")
|
|
|
|
|
(upcase formatted-title)
|
|
|
|
|
(cond
|
|
|
|
|
((and (org-string-nw-p author) (org-string-nw-p email))
|
2012-02-12 21:08:44 +00:00
|
|
|
|
(concat (if utf8p "\n\n\n" "\n\n") author "\n" email))
|
|
|
|
|
((org-string-nw-p author)
|
|
|
|
|
(concat (if utf8p "\n\n\n" "\n\n") author))
|
|
|
|
|
((org-string-nw-p email)
|
|
|
|
|
(concat (if utf8p "\n\n\n" "\n\n") email)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"\n" line
|
|
|
|
|
(when (org-string-nw-p date) (concat "\n\n\n" date))
|
|
|
|
|
"\n\n\n") text-width 'center)))))
|
|
|
|
|
|
2013-02-13 12:55:49 +00:00
|
|
|
|
(defun org-ascii-inner-template (contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return complete document string after ASCII conversion.
|
|
|
|
|
CONTENTS is the transcoded contents string. INFO is a plist
|
|
|
|
|
holding export options."
|
2012-01-28 13:49:50 +00:00
|
|
|
|
(org-element-normalize-string
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--indent-string
|
2013-02-13 12:55:49 +00:00
|
|
|
|
(concat
|
|
|
|
|
;; 1. Document's body.
|
|
|
|
|
contents
|
|
|
|
|
;; 2. Footnote definitions.
|
|
|
|
|
(let ((definitions (org-export-collect-footnote-definitions
|
|
|
|
|
(plist-get info :parse-tree) info))
|
|
|
|
|
;; Insert full links right inside the footnote definition
|
|
|
|
|
;; as they have no chance to be inserted later.
|
|
|
|
|
(org-ascii-links-to-notes nil))
|
|
|
|
|
(when definitions
|
|
|
|
|
(concat
|
|
|
|
|
"\n\n\n"
|
|
|
|
|
(let ((title (org-ascii--translate "Footnotes" info)))
|
|
|
|
|
(concat
|
|
|
|
|
title "\n"
|
|
|
|
|
(make-string
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(string-width title)
|
2013-02-13 12:55:49 +00:00
|
|
|
|
(if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_))))
|
|
|
|
|
"\n\n"
|
|
|
|
|
(let ((text-width (- org-ascii-text-width org-ascii-global-margin)))
|
2012-01-28 13:49:50 +00:00
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (ref)
|
|
|
|
|
(let ((id (format "[%s] " (car ref))))
|
|
|
|
|
;; Distinguish between inline definitions and
|
|
|
|
|
;; full-fledged definitions.
|
|
|
|
|
(org-trim
|
|
|
|
|
(let ((def (nth 2 ref)))
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(if (eq (org-element-type def) 'org-data)
|
2012-01-28 13:49:50 +00:00
|
|
|
|
;; Full-fledged definition: footnote ID is
|
|
|
|
|
;; inserted inside the first parsed paragraph
|
|
|
|
|
;; (FIRST), if any, to be sure filling will
|
|
|
|
|
;; take it into consideration.
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(let ((first (car (org-element-contents def))))
|
org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-caption, org-e-ascii--build-title,
org-e-ascii--describe-links, org-e-ascii-template,
org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
refactoring.
(org-e-latex-footnote-reference, org-e-latex-link): Use new
accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
(org-element-map, org-element-parse-elements,
org-element-interpret-data, org-element-normalize-contents,
org-element-forward, org-element-unindent-buffer): Use new
accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-get-min-level, org-export-data, org-export-skip-p,
org-export-interpret-p, org-export-expand,
org-export-expand-include-keyword,
org-export-prepare-file-contents, org-export-first-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal,
org-export-get-loc, org-export-get-genealogy,
org-export-get-parent-headline): Use new accessor.
2012-02-22 12:07:27 +00:00
|
|
|
|
(if (not (eq (org-element-type first) 'paragraph))
|
org-export: Remove unnecessary back-end arguments
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii--build-caption, org-e-ascii--list-listings,
org-e-ascii--list-tables, org-e-ascii--describe-links,
org-e-ascii-template--document-title, org-e-ascii-dynamic-block,
org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link,
org-e-ascii-quote-section, org-e-ascii--table-cell-width): Do not
provide back-end symbol.
* contrib/lisp/org-e-html.el (org-e-html--caption/label-string,
org-e-html-footnote-section, org-e-html-template,
org-e-html-dynamic-block, org-e-html-format-headline--wrap,
org-e-html-headline, org-e-html-item, org-e-html-link,
org-e-html-time-stamp): Do not provide back-end symbol.
* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string,
org-e-latex-template, org-e-latex-dynamic-block,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link,
org-e-latex-src-block): Do not provide back-end symbol.
* contrib/lisp/org-e-odt.el (org-e-odt-format-preamble,
org-e-odt-format-label, org-e-odt-write-manifest-file,
org-e-odt--caption/label-string, org-e-odt-dynamic-block,
org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item,
org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block,
org-e-odt-time-stamp): Do not provide back-end symbol.
* contrib/lisp/org-export.el (org-export-get-environment): Provide
back-end symbol under `:back-end' property.
(org-export-collect-tree-properties, org-export-data,
org-export-filter-verbatim-functions, org-export-install-filters,
org-export-as, org-export-expand-macro,
org-export-filter-apply-functions, org-export-secondary-string):
Remove back-end references.
* testing/lisp/test-org-export.el: Update tests.
Back-end can be found in communication channel with (plist-get
info :back-end). Hence back-ends do not have to hard-code their name
in any transcoder. It will allow to derive a back-end from another
one.
2012-04-28 09:33:16 +00:00
|
|
|
|
(concat id "\n" (org-export-data def info))
|
2012-01-28 13:49:50 +00:00
|
|
|
|
(push id (nthcdr 2 first))
|
org-export: Remove unnecessary back-end arguments
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii--build-caption, org-e-ascii--list-listings,
org-e-ascii--list-tables, org-e-ascii--describe-links,
org-e-ascii-template--document-title, org-e-ascii-dynamic-block,
org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link,
org-e-ascii-quote-section, org-e-ascii--table-cell-width): Do not
provide back-end symbol.
* contrib/lisp/org-e-html.el (org-e-html--caption/label-string,
org-e-html-footnote-section, org-e-html-template,
org-e-html-dynamic-block, org-e-html-format-headline--wrap,
org-e-html-headline, org-e-html-item, org-e-html-link,
org-e-html-time-stamp): Do not provide back-end symbol.
* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string,
org-e-latex-template, org-e-latex-dynamic-block,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link,
org-e-latex-src-block): Do not provide back-end symbol.
* contrib/lisp/org-e-odt.el (org-e-odt-format-preamble,
org-e-odt-format-label, org-e-odt-write-manifest-file,
org-e-odt--caption/label-string, org-e-odt-dynamic-block,
org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item,
org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block,
org-e-odt-time-stamp): Do not provide back-end symbol.
* contrib/lisp/org-export.el (org-export-get-environment): Provide
back-end symbol under `:back-end' property.
(org-export-collect-tree-properties, org-export-data,
org-export-filter-verbatim-functions, org-export-install-filters,
org-export-as, org-export-expand-macro,
org-export-filter-apply-functions, org-export-secondary-string):
Remove back-end references.
* testing/lisp/test-org-export.el: Update tests.
Back-end can be found in communication channel with (plist-get
info :back-end). Hence back-ends do not have to hard-code their name
in any transcoder. It will allow to derive a back-end from another
one.
2012-04-28 09:33:16 +00:00
|
|
|
|
(org-export-data def info)))
|
2013-02-13 12:55:49 +00:00
|
|
|
|
;; Fill paragraph once footnote ID is inserted
|
|
|
|
|
;; in order to have a correct length for first
|
|
|
|
|
;; line.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--fill-string
|
org-export: Secondary strings are transcoded with `org-export-data'
* contrib/lisp/org-export.el (org-export-transcoder): New function.
(org-export-data): Also export secondary strings. Refactored.
(org-export-secondary-string): Remove function.
(org-export-expand): Fix code indentation.
(org-export-expand-macro): Use `org-export-data' instead of
`org-export-secondary-string'.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii--build-caption, org-e-ascii--list-listings,
org-e-ascii--list-tables, org-e-ascii--describe-links,
org-e-ascii-template--document-title, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section,
org-e-ascii--table-cell-width): Use `org-export-data' instead of
`org-export-secondary-string'.
* contrib/lisp/org-e-html.el (org-e-html-footnote-section,
org-e-html--caption/label-string, org-e-html-meta-info,
org-e-html-preamble, org-e-html-template,
org-e-html-format-headline--wrap, org-e-html-headline,
org-e-html-item, org-e-html-link): Use `org-export-data' instead of
`org-export-secondary-string'.
* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string,
org-e-latex-template, org-e-latex-footnote-reference,
org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item,
org-e-latex-link, org-e-latex-src-block): Use `org-export-data'
instead of `org-export-secondary-string'.
* contrib/lisp/org-e-odt.el (org-e-odt-format-preamble,
org-e-odt-format-label, org-e-odt-update-meta-file,
org-e-odt--caption/label-string, org-e-odt-footnote-def,
org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item,
org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block):
Use `org-export-data' instead of `org-export-secondary-string'.
2012-04-30 00:04:03 +00:00
|
|
|
|
(concat id (org-export-data def info))
|
2012-01-28 13:49:50 +00:00
|
|
|
|
text-width info))))))
|
2013-02-13 12:55:49 +00:00
|
|
|
|
definitions "\n\n"))))))
|
|
|
|
|
org-ascii-global-margin)))
|
|
|
|
|
|
|
|
|
|
(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."
|
|
|
|
|
(concat
|
|
|
|
|
;; 1. 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"))))
|
|
|
|
|
org-ascii-global-margin)
|
|
|
|
|
;; 3. Document's body.
|
|
|
|
|
contents
|
|
|
|
|
;; 4. Creator. Ignore `comment' value as there are no comments in
|
|
|
|
|
;; ASCII. Justify it to the bottom right.
|
|
|
|
|
(org-ascii--indent-string
|
|
|
|
|
(let ((creator-info (plist-get info :with-creator))
|
|
|
|
|
(text-width (- org-ascii-text-width org-ascii-global-margin)))
|
|
|
|
|
(unless (or (not creator-info) (eq creator-info 'comment))
|
|
|
|
|
(concat
|
|
|
|
|
"\n\n\n"
|
|
|
|
|
(org-ascii--fill-string
|
|
|
|
|
(plist-get info :creator) text-width info 'right))))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-ascii-global-margin)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--translate (s info)
|
2012-07-12 11:20:09 +00:00
|
|
|
|
"Translate string S according to specified language and charset.
|
|
|
|
|
INFO is a plist used as a communication channel."
|
|
|
|
|
(let ((charset (intern (format ":%s" (plist-get info :ascii-charset)))))
|
|
|
|
|
(org-export-translate s charset info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Transcode Functions
|
|
|
|
|
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
;;;; Bold
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-bold (bold contents info)
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
"Transcode BOLD from Org to ASCII.
|
|
|
|
|
CONTENTS is the text with bold markup. INFO is a plist holding
|
|
|
|
|
contextual information."
|
|
|
|
|
(format "*%s*" contents))
|
|
|
|
|
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;;;; Center Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-center-block (center-block contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a CENTER-BLOCK element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the block. INFO is a plist
|
|
|
|
|
holding contextual information."
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
;; Center has already been taken care of at a lower level, so
|
|
|
|
|
;; there's nothing left to do.
|
|
|
|
|
contents)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
2012-04-29 00:11:22 +00:00
|
|
|
|
;;;; Clock
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-clock (clock contents info)
|
2012-04-29 00:11:22 +00:00
|
|
|
|
"Transcode a CLOCK object from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(concat org-clock-string " "
|
|
|
|
|
(org-translate-time
|
|
|
|
|
(org-element-property :raw-value
|
|
|
|
|
(org-element-property :value clock)))
|
|
|
|
|
(let ((time (org-element-property :duration clock)))
|
|
|
|
|
(and time
|
|
|
|
|
(concat " => "
|
|
|
|
|
(apply 'format
|
|
|
|
|
"%2s:%02s"
|
|
|
|
|
(org-split-string time ":"))))))
|
|
|
|
|
clock info))
|
2012-04-29 00:11:22 +00:00
|
|
|
|
|
|
|
|
|
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
;;;; Code
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-code (code contents info)
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
"Return a CODE object from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-ascii-verbatim-format (org-element-property :value code)))
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;;;; Drawer
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-drawer (drawer contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a DRAWER element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the block. INFO is a plist
|
|
|
|
|
holding contextual information."
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(let ((name (org-element-property :drawer-name drawer))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(width (org-ascii--current-text-width drawer info)))
|
2013-11-14 13:05:18 +00:00
|
|
|
|
(funcall org-ascii-format-drawer-function name contents width)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Dynamic Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-dynamic-block (dynamic-block contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a DYNAMIC-BLOCK element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the block. INFO is a plist
|
2012-05-04 12:02:41 +00:00
|
|
|
|
holding contextual information."
|
2012-01-07 13:01:25 +00:00
|
|
|
|
contents)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Entity
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-entity (entity contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode an ENTITY object from Org to ASCII.
|
|
|
|
|
CONTENTS are the definition itself. INFO is a plist holding
|
|
|
|
|
contextual information."
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(org-element-property
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(intern (concat ":" (symbol-name (plist-get info :ascii-charset))))
|
|
|
|
|
entity))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Example Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-example-block (example-block contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a EXAMPLE-BLOCK element from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(org-ascii--box-string
|
|
|
|
|
(org-export-format-code-default example-block info) info)
|
|
|
|
|
example-block info))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Export Snippet
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-export-snippet (export-snippet contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a EXPORT-SNIPPET object from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(when (eq (org-export-snippet-backend export-snippet) 'ascii)
|
2012-02-23 17:10:14 +00:00
|
|
|
|
(org-element-property :value export-snippet)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Export Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-export-block (export-block contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a EXPORT-BLOCK element from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2012-05-05 20:47:00 +00:00
|
|
|
|
(when (string= (org-element-property :type export-block) "ASCII")
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(org-element-property :value export-block) export-block info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Fixed Width
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-fixed-width (fixed-width contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a FIXED-WIDTH element from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(org-ascii--box-string
|
|
|
|
|
(org-remove-indentation
|
|
|
|
|
(org-element-property :value fixed-width)) info)
|
|
|
|
|
fixed-width info))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Footnote Definition
|
|
|
|
|
|
|
|
|
|
;; Footnote Definitions are ignored. They are compiled at the end of
|
2013-04-21 21:51:54 +00:00
|
|
|
|
;; the document, by `org-ascii-inner-template'.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Footnote Reference
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-footnote-reference (footnote-reference contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a FOOTNOTE-REFERENCE element from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
|
|
|
|
(format "[%s]" (org-export-get-footnote-number footnote-reference info)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Headline
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-headline (headline contents info)
|
2013-02-23 12:47:44 +00:00
|
|
|
|
"Transcode a HEADLINE element from Org to ASCII.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
CONTENTS holds the contents of the headline. INFO is a plist
|
|
|
|
|
holding contextual information."
|
|
|
|
|
;; Don't export footnote section, which will be handled at the end
|
|
|
|
|
;; of the template.
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(unless (org-element-property :footnote-section-p headline)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(let* ((low-level-rank (org-export-low-level-p headline info))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(width (org-ascii--current-text-width headline info))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Blank lines between headline and its contents.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; `org-ascii-headline-spacing', when set, overwrites
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; original buffer's spacing.
|
|
|
|
|
(pre-blanks
|
|
|
|
|
(make-string
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(if org-ascii-headline-spacing (car org-ascii-headline-spacing)
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(org-element-property :pre-blank headline)) ?\n))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Even if HEADLINE has no section, there might be some
|
|
|
|
|
;; links in its title that we shouldn't forget to describe.
|
|
|
|
|
(links
|
2012-07-18 17:24:11 +00:00
|
|
|
|
(unless (or (eq (caar (org-element-contents headline)) 'section))
|
|
|
|
|
(let ((title (org-element-property :title headline)))
|
|
|
|
|
(when (consp title)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--describe-links
|
|
|
|
|
(org-ascii--unique-links title info) width info))))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Deep subtree: export it as a list item.
|
|
|
|
|
(if low-level-rank
|
|
|
|
|
(concat
|
|
|
|
|
;; Bullet.
|
|
|
|
|
(let ((bullets (cdr (assq (plist-get info :ascii-charset)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-ascii-bullets))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(char-to-string
|
|
|
|
|
(nth (mod (1- low-level-rank) (length bullets)) bullets)))
|
|
|
|
|
" "
|
|
|
|
|
;; Title.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--build-title headline info width) "\n"
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Contents, indented by length of bullet.
|
|
|
|
|
pre-blanks
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--indent-string
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(concat contents
|
|
|
|
|
(when (org-string-nw-p links) (concat "\n\n" links)))
|
|
|
|
|
2))
|
|
|
|
|
;; Else: Standard headline.
|
|
|
|
|
(concat
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--build-title headline info width 'underline)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"\n" pre-blanks
|
|
|
|
|
(concat (when (org-string-nw-p links) links) contents))))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Horizontal Rule
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-horizontal-rule (horizontal-rule contents info)
|
2012-07-23 07:43:29 +00:00
|
|
|
|
"Transcode an HORIZONTAL-RULE object from Org to ASCII.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((text-width (org-ascii--current-text-width horizontal-rule info))
|
2012-07-25 10:55:00 +00:00
|
|
|
|
(spec-width
|
|
|
|
|
(org-export-read-attribute :attr_ascii horizontal-rule :width)))
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-lines
|
2013-03-08 23:58:31 +00:00
|
|
|
|
(make-string (if (and spec-width (string-match "^[0-9]+$" spec-width))
|
|
|
|
|
(string-to-number spec-width)
|
|
|
|
|
text-width)
|
2012-07-25 10:55:00 +00:00
|
|
|
|
(if (eq (plist-get info :ascii-charset) 'utf-8) ?― ?-))
|
|
|
|
|
text-width 'center)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Inline Src Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-inline-src-block (inline-src-block contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode an INLINE-SRC-BLOCK element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the item. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-ascii-verbatim-format
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(org-element-property :value inline-src-block)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Inlinetask
|
|
|
|
|
|
2013-11-14 13:05:18 +00:00
|
|
|
|
(defun org-ascii-format-inlinetask-default
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(todo type priority name tags contents width inlinetask info)
|
2013-11-14 13:05:18 +00:00
|
|
|
|
"Format an inline task element for ASCII export.
|
|
|
|
|
See `org-ascii-format-inlinetask-function' for a description
|
2014-01-07 13:18:17 +00:00
|
|
|
|
of the parameters."
|
2013-11-14 13:05:18 +00:00
|
|
|
|
(let* ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))
|
|
|
|
|
(width (or width org-ascii-inlinetask-width)))
|
|
|
|
|
(org-ascii--indent-string
|
|
|
|
|
(concat
|
|
|
|
|
;; Top line, with an additional blank line if not in UTF-8.
|
|
|
|
|
(make-string width (if utf8p ?━ ?_)) "\n"
|
|
|
|
|
(unless utf8p (concat (make-string width ? ) "\n"))
|
|
|
|
|
;; Add title. Fill it if wider than inlinetask.
|
|
|
|
|
(let ((title (org-ascii--build-title inlinetask info width)))
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(if (<= (string-width title) width) title
|
2013-11-14 13:05:18 +00:00
|
|
|
|
(org-ascii--fill-string title width info)))
|
|
|
|
|
"\n"
|
|
|
|
|
;; If CONTENTS is not empty, insert it along with
|
|
|
|
|
;; a separator.
|
|
|
|
|
(when (org-string-nw-p contents)
|
|
|
|
|
(concat (make-string width (if utf8p ?─ ?-)) "\n" contents))
|
|
|
|
|
;; Bottom line.
|
|
|
|
|
(make-string width (if utf8p ?━ ?_)))
|
|
|
|
|
;; Flush the inlinetask to the right.
|
|
|
|
|
(- org-ascii-text-width org-ascii-global-margin
|
|
|
|
|
(if (not (org-export-get-parent-headline inlinetask)) 0
|
|
|
|
|
org-ascii-inner-margin)
|
|
|
|
|
(org-ascii--current-text-width inlinetask info)))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-inlinetask (inlinetask contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode an INLINETASK element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the block. INFO is a plist
|
|
|
|
|
holding contextual information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((width (org-ascii--current-text-width inlinetask info)))
|
2013-11-14 13:05:18 +00:00
|
|
|
|
(funcall org-ascii-format-inlinetask-function
|
|
|
|
|
;; todo.
|
|
|
|
|
(and (plist-get info :with-todo-keywords)
|
|
|
|
|
(let ((todo (org-element-property
|
|
|
|
|
:todo-keyword inlinetask)))
|
|
|
|
|
(and todo (org-export-data todo info))))
|
|
|
|
|
;; todo-type
|
|
|
|
|
(org-element-property :todo-type inlinetask)
|
|
|
|
|
;; priority
|
|
|
|
|
(and (plist-get info :with-priority)
|
|
|
|
|
(org-element-property :priority inlinetask))
|
|
|
|
|
;; title
|
|
|
|
|
(org-export-data (org-element-property :title inlinetask) info)
|
|
|
|
|
;; tags
|
|
|
|
|
(and (plist-get info :with-tags)
|
|
|
|
|
(org-element-property :tags inlinetask))
|
|
|
|
|
;; contents and width
|
|
|
|
|
contents width inlinetask info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2012-11-23 17:43:05 +00:00
|
|
|
|
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
;;;; Italic
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-italic (italic contents info)
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
"Transcode italic from Org to ASCII.
|
|
|
|
|
CONTENTS is the text with italic markup. INFO is a plist holding
|
|
|
|
|
contextual information."
|
|
|
|
|
(format "/%s/" contents))
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
;;;; Item
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-item (item contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode an ITEM element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the item. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2012-06-09 13:34:27 +00:00
|
|
|
|
(let* ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(checkbox (org-ascii--checkbox item info))
|
2012-06-09 13:34:27 +00:00
|
|
|
|
(list-type (org-element-property :type (org-export-get-parent item)))
|
|
|
|
|
(bullet
|
|
|
|
|
;; First parent of ITEM is always the plain-list. Get
|
|
|
|
|
;; `:type' property from it.
|
|
|
|
|
(org-list-bullet-string
|
|
|
|
|
(case list-type
|
|
|
|
|
(descriptive
|
|
|
|
|
(concat checkbox
|
|
|
|
|
(org-export-data (org-element-property :tag item) info)
|
|
|
|
|
": "))
|
|
|
|
|
(ordered
|
|
|
|
|
;; Return correct number for ITEM, paying attention to
|
|
|
|
|
;; counters.
|
|
|
|
|
(let* ((struct (org-element-property :structure item))
|
|
|
|
|
(bul (org-element-property :bullet item))
|
|
|
|
|
(num (number-to-string
|
|
|
|
|
(car (last (org-list-get-item-number
|
|
|
|
|
(org-element-property :begin item)
|
|
|
|
|
struct
|
|
|
|
|
(org-list-prevs-alist struct)
|
|
|
|
|
(org-list-parents-alist struct)))))))
|
|
|
|
|
(replace-regexp-in-string "[0-9]+" num bul)))
|
|
|
|
|
(t (let ((bul (org-element-property :bullet item)))
|
|
|
|
|
;; Change bullets into more visible form if UTF-8 is active.
|
|
|
|
|
(if (not utf8p) bul
|
2012-02-20 16:15:04 +00:00
|
|
|
|
(replace-regexp-in-string
|
2012-06-09 13:34:27 +00:00
|
|
|
|
"-" "•"
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"+" "⁃"
|
|
|
|
|
(replace-regexp-in-string "*" "‣" bul))))))))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(concat
|
2012-02-20 16:15:04 +00:00
|
|
|
|
bullet
|
2012-06-09 13:34:27 +00:00
|
|
|
|
(unless (eq list-type 'descriptive) checkbox)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Contents: Pay attention to indentation. Note: check-boxes are
|
|
|
|
|
;; already taken care of at the paragraph level so they don't
|
|
|
|
|
;; interfere with indentation.
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(let ((contents (org-ascii--indent-string contents (string-width bullet))))
|
2012-06-09 13:34:27 +00:00
|
|
|
|
(if (eq (org-element-type (car (org-element-contents item))) 'paragraph)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(org-trim contents)
|
|
|
|
|
(concat "\n" contents))))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Keyword
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-keyword (keyword contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a KEYWORD element from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(let ((key (org-element-property :key keyword)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(cond
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
((string= key "ASCII")
|
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(org-element-property :value keyword) keyword info))
|
2012-03-28 12:04:26 +00:00
|
|
|
|
((string= key "TOC")
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(let ((value (downcase (org-element-property :value keyword))))
|
|
|
|
|
(cond
|
|
|
|
|
((string-match "\\<headlines\\>" value)
|
|
|
|
|
(let ((depth (or (and (string-match "[0-9]+" value)
|
|
|
|
|
(string-to-number (match-string 0 value)))
|
|
|
|
|
(plist-get info :with-toc))))
|
|
|
|
|
(org-ascii--build-toc
|
|
|
|
|
info (and (wholenump depth) depth) keyword)))
|
|
|
|
|
((string= "tables" value)
|
|
|
|
|
(org-ascii--list-tables keyword info))
|
|
|
|
|
((string= "listings" value)
|
|
|
|
|
(org-ascii--list-listings keyword info))))
|
|
|
|
|
keyword info)))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Latex Environment
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-latex-environment (latex-environment contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a LATEX-ENVIRONMENT element from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(when (plist-get info :with-latex)
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(org-remove-indentation (org-element-property :value latex-environment))
|
|
|
|
|
latex-environment info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Latex Fragment
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-latex-fragment (latex-fragment contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a LATEX-FRAGMENT object from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(when (plist-get info :with-latex)
|
|
|
|
|
(org-element-property :value latex-fragment)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Line Break
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-line-break (line-break contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a LINE-BREAK object from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information." hard-newline)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Link
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-link (link desc info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a LINK object from Org to ASCII.
|
|
|
|
|
|
|
|
|
|
DESC is the description part of the link, or the empty string.
|
|
|
|
|
INFO is a plist holding contextual information."
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(let ((raw-link (org-element-property :raw-link link))
|
|
|
|
|
(type (org-element-property :type link)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(cond
|
|
|
|
|
((string= type "coderef")
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(let ((ref (org-element-property :path link)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(format (org-export-get-coderef-format ref desc)
|
|
|
|
|
(org-export-resolve-coderef ref info))))
|
2014-03-20 17:21:29 +00:00
|
|
|
|
;; Do not apply a special syntax on radio links. Though, use
|
|
|
|
|
;; transcoded target's contents as output.
|
2014-03-23 17:04:22 +00:00
|
|
|
|
((string= type "radio") desc)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Do not apply a special syntax on fuzzy links pointing to
|
|
|
|
|
;; targets.
|
2012-02-20 21:24:38 +00:00
|
|
|
|
((string= type "fuzzy")
|
|
|
|
|
(let ((destination (org-export-resolve-fuzzy-link link info)))
|
2013-04-04 18:35:05 +00:00
|
|
|
|
(if (org-string-nw-p desc) desc
|
|
|
|
|
(when destination
|
|
|
|
|
(let ((number
|
|
|
|
|
(org-export-get-ordinal
|
|
|
|
|
destination info nil 'org-ascii--has-caption-p)))
|
|
|
|
|
(when number
|
|
|
|
|
(if (atom number) (number-to-string number)
|
|
|
|
|
(mapconcat 'number-to-string number "."))))))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(t
|
2012-02-20 21:24:38 +00:00
|
|
|
|
(if (not (org-string-nw-p desc)) (format "[%s]" raw-link)
|
|
|
|
|
(concat
|
|
|
|
|
(format "[%s]" desc)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(unless org-ascii-links-to-notes (format " (%s)" raw-link))))))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
2013-09-25 19:27:29 +00:00
|
|
|
|
;;;; Node Properties
|
|
|
|
|
|
|
|
|
|
(defun org-ascii-node-property (node-property contents info)
|
|
|
|
|
"Transcode a NODE-PROPERTY element from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
|
|
|
|
(format "%s:%s"
|
|
|
|
|
(org-element-property :key node-property)
|
|
|
|
|
(let ((value (org-element-property :value node-property)))
|
|
|
|
|
(if value (concat " " value) ""))))
|
|
|
|
|
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;;;; Paragraph
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-paragraph (paragraph contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a PARAGRAPH element from Org to ASCII.
|
|
|
|
|
CONTENTS is the contents of the paragraph, as a string. INFO is
|
|
|
|
|
the plist used as a communication channel."
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
2014-05-17 08:00:41 +00:00
|
|
|
|
(if (not (wholenump org-ascii-indented-line-width)) contents
|
|
|
|
|
(concat
|
|
|
|
|
;; Do not indent first paragraph in a section.
|
|
|
|
|
(unless (and (not (org-export-get-previous-element paragraph info))
|
|
|
|
|
(eq (org-element-type (org-export-get-parent paragraph))
|
|
|
|
|
'section))
|
|
|
|
|
(make-string org-ascii-indented-line-width ?\s))
|
|
|
|
|
(replace-regexp-in-string "\\`[ \t]+" "" contents)))
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
paragraph info))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Plain List
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-plain-list (plain-list contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a PLAIN-LIST element from Org to ASCII.
|
|
|
|
|
CONTENTS is the contents of the list. INFO is a plist holding
|
|
|
|
|
contextual information."
|
|
|
|
|
contents)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Plain Text
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-plain-text (text info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a TEXT string from Org to ASCII.
|
|
|
|
|
INFO is a plist used as a communication channel."
|
2012-10-26 22:36:00 +00:00
|
|
|
|
(let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)))
|
|
|
|
|
(when (and utf8p (plist-get info :with-smart-quotes))
|
|
|
|
|
(setq text (org-export-activate-smart-quotes text :utf-8 info)))
|
|
|
|
|
(if (not (plist-get info :with-special-strings)) text
|
|
|
|
|
(setq text (replace-regexp-in-string "\\\\-" "" text))
|
|
|
|
|
(if (not utf8p) text
|
|
|
|
|
;; Usual replacements in utf-8 with proper option set.
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"\\.\\.\\." "…"
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"--" "–"
|
|
|
|
|
(replace-regexp-in-string "---" "—" text)))))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
2012-04-29 00:11:22 +00:00
|
|
|
|
;;;; Planning
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-planning (planning contents info)
|
2012-04-29 00:11:22 +00:00
|
|
|
|
"Transcode a PLANNING element from Org to ASCII.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
CONTENTS is nil. INFO is a plist used as a communication
|
|
|
|
|
channel."
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(mapconcat
|
|
|
|
|
#'identity
|
|
|
|
|
(delq nil
|
|
|
|
|
(list (let ((closed (org-element-property :closed planning)))
|
|
|
|
|
(when closed
|
|
|
|
|
(concat org-closed-string " "
|
|
|
|
|
(org-translate-time
|
|
|
|
|
(org-element-property :raw-value closed)))))
|
|
|
|
|
(let ((deadline (org-element-property :deadline planning)))
|
|
|
|
|
(when deadline
|
|
|
|
|
(concat org-deadline-string " "
|
|
|
|
|
(org-translate-time
|
|
|
|
|
(org-element-property :raw-value deadline)))))
|
|
|
|
|
(let ((scheduled (org-element-property :scheduled planning)))
|
|
|
|
|
(when scheduled
|
|
|
|
|
(concat org-scheduled-string " "
|
|
|
|
|
(org-translate-time
|
|
|
|
|
(org-element-property :raw-value scheduled)))))))
|
|
|
|
|
" ")
|
|
|
|
|
planning info))
|
2012-04-29 00:11:22 +00:00
|
|
|
|
|
|
|
|
|
|
2013-09-25 19:27:29 +00:00
|
|
|
|
;;;; Property Drawer
|
|
|
|
|
|
|
|
|
|
(defun org-ascii-property-drawer (property-drawer contents info)
|
|
|
|
|
"Transcode a PROPERTY-DRAWER element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the drawer. INFO is a plist
|
|
|
|
|
holding contextual information."
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(and (org-string-nw-p contents)
|
|
|
|
|
(org-ascii--justify-element contents property-drawer info)))
|
2013-09-25 19:27:29 +00:00
|
|
|
|
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;;;; Quote Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-quote-block (quote-block contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a QUOTE-BLOCK element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the block. INFO is a plist
|
|
|
|
|
holding contextual information."
|
2013-02-18 19:55:04 +00:00
|
|
|
|
(org-ascii--indent-string contents org-ascii-quote-margin))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Radio Target
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-radio-target (radio-target contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a RADIO-TARGET object from Org to ASCII.
|
|
|
|
|
CONTENTS is the contents of the target. INFO is a plist holding
|
|
|
|
|
contextual information."
|
|
|
|
|
contents)
|
|
|
|
|
|
2012-11-23 17:43:05 +00:00
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;;;; Section
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-section (section contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a SECTION element from Org to ASCII.
|
|
|
|
|
CONTENTS is the contents of the section. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii--indent-string
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(concat
|
|
|
|
|
contents
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(when org-ascii-links-to-notes
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Add list of links at the end of SECTION.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((links (org-ascii--describe-links
|
|
|
|
|
(org-ascii--unique-links section info)
|
|
|
|
|
(org-ascii--current-text-width section info) info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;; Separate list of links and section contents.
|
|
|
|
|
(when (org-string-nw-p links) (concat "\n\n" links)))))
|
|
|
|
|
;; Do not apply inner margin if parent headline is low level.
|
org-export: Rewrite topology functions
* contrib/lisp/org-export.el (org-export-get-genealogy,
org-export-get-parent, org-export-get-parent-headline,
org-export-get-parent-table): Rewrite function to use :parent
property. Remove communication channel from signature.
(org-export-get-parent-element): Rename from
`org-export-get-parent-paragraph'.
(org-export-data, org-export-table-row-is-special-p)
org-export-table-row-group, org-export-table-cell-starts-colgroup-p,
org-export-table-cell-ends-colgroup-p,
org-export-table-row-starts-header-p,
org-export-table-row-ends-header-p, org-export-table-cell-address,
org-export-first-sibling-p, org-export-last-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal): Apply
signature change.
(org-export--skip-p, org-export-table-cell-width,
org-export-table-cell-alignment, org-export-table-cell-borders):
Refactor code. Apply signature change.
* contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--unique-links, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-section, org-e-ascii--table-cell-width): Apply signature
change.
* contrib/lisp/org-e-html.el (org-e-html-link,
org-e-html-link--inline-image): Use new function and apply signature
change.
(org-e-html-item, org-e-html-standalone-image-p, org-e-html-paragraph,
org-e-html-section, org-e-html-table-cell, org-e-html-table-row,
org-e-html-footnote-reference): Apply signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-link--inline-image): Use
new function and apply signature change.
(org-e-latex-footnote-reference, org-e-latex-item,
org-e-latex-table-cell, org-e-latex-table-row): Apply signature
change.
* contrib/lisp/org-e-odt.el (org-e-odt-format-formula,
org-e-odt-format-label, org-e-odt-link--inline-image): Use new
function and apply signature change.
(org-e-odt-item, org-e-odt-standalone-image-p, org-e-odt-paragraph,
org-e-odt-plain-list, org-e-odt-table-style-spec,
org-e-odt-get-table-cell-styles, org-e-odt-table-cell,
org-e-odt-table-row, org-e-odt-table, org-e-odt-footnote-reference,
org-e-odt-enumerate-element): Apply signature change.
2012-06-08 19:00:47 +00:00
|
|
|
|
(let ((headline (org-export-get-parent-headline section)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(if (or (not headline) (org-export-low-level-p headline info)) 0
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-ascii-inner-margin))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Special Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-special-block (special-block contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a SPECIAL-BLOCK element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the block. INFO is a plist
|
|
|
|
|
holding contextual information."
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
;; "JUSTIFYLEFT" and "JUSTFYRIGHT" have already been taken care of
|
|
|
|
|
;; at a lower level. There is no other special block type to
|
|
|
|
|
;; handle.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
contents)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Src Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-src-block (src-block contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a SRC-BLOCK element from Org to ASCII.
|
|
|
|
|
CONTENTS holds the contents of the item. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2013-03-03 18:10:42 +00:00
|
|
|
|
(let ((caption (org-ascii--build-caption src-block info))
|
|
|
|
|
(code (org-export-format-code-default src-block info)))
|
|
|
|
|
(if (equal code "") ""
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(concat
|
|
|
|
|
(when (and caption org-ascii-caption-above) (concat caption "\n"))
|
|
|
|
|
(org-ascii--box-string code info)
|
|
|
|
|
(when (and caption (not org-ascii-caption-above))
|
|
|
|
|
(concat "\n" caption)))
|
|
|
|
|
src-block info))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2012-11-23 17:43:05 +00:00
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;;;; Statistics Cookie
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-statistics-cookie (statistics-cookie contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a STATISTICS-COOKIE object from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(org-element-property :value statistics-cookie))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Subscript
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-subscript (subscript contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a SUBSCRIPT object from Org to ASCII.
|
|
|
|
|
CONTENTS is the contents of the object. INFO is a plist holding
|
|
|
|
|
contextual information."
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(if (org-element-property :use-brackets-p subscript)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(format "_{%s}" contents)
|
|
|
|
|
(format "_%s" contents)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Superscript
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-superscript (superscript contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a SUPERSCRIPT object from Org to ASCII.
|
|
|
|
|
CONTENTS is the contents of the object. INFO is a plist holding
|
|
|
|
|
contextual information."
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(if (org-element-property :use-brackets-p superscript)
|
2014-05-09 03:47:14 +00:00
|
|
|
|
(format "^{%s}" contents)
|
|
|
|
|
(format "^%s" contents)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
;;;; Strike-through
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-strike-through (strike-through contents info)
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
"Transcode STRIKE-THROUGH from Org to ASCII.
|
|
|
|
|
CONTENTS is text with strike-through markup. INFO is a plist
|
|
|
|
|
holding contextual information."
|
|
|
|
|
(format "+%s+" contents))
|
|
|
|
|
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;;;; Table
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-table (table contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a TABLE element from Org to ASCII.
|
2012-05-23 21:21:25 +00:00
|
|
|
|
CONTENTS is the contents of the table. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((caption (org-ascii--build-caption table info)))
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element
|
|
|
|
|
(concat
|
|
|
|
|
;; Possibly add a caption string above.
|
|
|
|
|
(when (and caption org-ascii-caption-above) (concat caption "\n"))
|
|
|
|
|
;; Insert table. Note: "table.el" tables are left unmodified.
|
|
|
|
|
(cond ((eq (org-element-property :type table) 'org) contents)
|
|
|
|
|
((and org-ascii-table-use-ascii-art
|
|
|
|
|
(eq (plist-get info :ascii-charset) 'utf-8)
|
|
|
|
|
(require 'ascii-art-to-unicode nil t))
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(insert (org-remove-indentation
|
|
|
|
|
(org-element-property :value table)))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(aa2u)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(skip-chars-backward " \r\t\n")
|
|
|
|
|
(buffer-substring (point-min) (point))))
|
|
|
|
|
(t (org-remove-indentation (org-element-property :value table))))
|
|
|
|
|
;; Possible add a caption string below.
|
|
|
|
|
(and (not org-ascii-caption-above) caption))
|
|
|
|
|
table info)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
2012-04-21 07:52:08 +00:00
|
|
|
|
;;;; Table Cell
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii--table-cell-width (table-cell info)
|
2012-04-21 07:52:08 +00:00
|
|
|
|
"Return width of TABLE-CELL.
|
|
|
|
|
|
2012-05-23 21:21:25 +00:00
|
|
|
|
INFO is a plist used as a communication channel.
|
|
|
|
|
|
2012-04-21 07:52:08 +00:00
|
|
|
|
Width of a cell is determined either by a width cookie in the
|
2012-05-23 21:21:25 +00:00
|
|
|
|
same column as the cell, or by the maximum cell's length in that
|
|
|
|
|
column.
|
2012-04-21 07:52:08 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
When `org-ascii-table-widen-columns' is non-nil, width cookies
|
2012-05-23 21:21:25 +00:00
|
|
|
|
are ignored."
|
2013-05-18 16:22:11 +00:00
|
|
|
|
(let* ((row (org-export-get-parent table-cell))
|
|
|
|
|
(table (org-export-get-parent row))
|
|
|
|
|
(col (let ((cells (org-element-contents row)))
|
|
|
|
|
(- (length cells) (length (memq table-cell cells)))))
|
|
|
|
|
(cache
|
|
|
|
|
(or (plist-get info :ascii-table-cell-width-cache)
|
|
|
|
|
(plist-get (setq info
|
|
|
|
|
(plist-put info :ascii-table-cell-width-cache
|
|
|
|
|
(make-hash-table :test 'equal)))
|
|
|
|
|
:ascii-table-cell-width-cache)))
|
|
|
|
|
(key (cons table col)))
|
|
|
|
|
(or (gethash key cache)
|
|
|
|
|
(puthash
|
|
|
|
|
key
|
|
|
|
|
(or (and (not org-ascii-table-widen-columns)
|
|
|
|
|
(org-export-table-cell-width table-cell info))
|
|
|
|
|
(let* ((max-width 0))
|
|
|
|
|
(org-element-map table 'table-row
|
|
|
|
|
(lambda (row)
|
|
|
|
|
(setq max-width
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(max (string-width
|
2013-05-18 16:22:11 +00:00
|
|
|
|
(org-export-data
|
|
|
|
|
(org-element-contents
|
|
|
|
|
(elt (org-element-contents row) col))
|
|
|
|
|
info))
|
|
|
|
|
max-width)))
|
|
|
|
|
info)
|
|
|
|
|
max-width))
|
|
|
|
|
cache))))
|
2012-04-21 07:52:08 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-table-cell (table-cell contents info)
|
2012-04-21 07:52:08 +00:00
|
|
|
|
"Transcode a TABLE-CELL object from Org to ASCII.
|
|
|
|
|
CONTENTS is the cell contents. INFO is a plist used as
|
|
|
|
|
a communication channel."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; Determine column width. When `org-ascii-table-widen-columns'
|
2012-04-21 07:52:08 +00:00
|
|
|
|
;; is nil and some width cookie has set it, use that value.
|
|
|
|
|
;; Otherwise, compute the maximum width among transcoded data of
|
|
|
|
|
;; each cell in the column.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((width (org-ascii--table-cell-width table-cell info)))
|
2012-04-21 07:52:08 +00:00
|
|
|
|
;; When contents are too large, truncate them.
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(unless (or org-ascii-table-widen-columns
|
|
|
|
|
(<= (string-width (or contents "")) width))
|
2012-04-21 07:52:08 +00:00
|
|
|
|
(setq contents (concat (substring contents 0 (- width 2)) "=>")))
|
|
|
|
|
;; Align contents correctly within the cell.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(let* ((indent-tabs-mode nil)
|
2012-04-21 07:52:08 +00:00
|
|
|
|
(data
|
|
|
|
|
(when contents
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-lines
|
2012-04-21 07:52:08 +00:00
|
|
|
|
contents width
|
|
|
|
|
(org-export-table-cell-alignment table-cell info)))))
|
2014-01-16 15:09:30 +00:00
|
|
|
|
(setq contents
|
|
|
|
|
(concat data
|
|
|
|
|
(make-string (- width (string-width (or data ""))) ?\s))))
|
2012-04-21 07:52:08 +00:00
|
|
|
|
;; Return cell.
|
|
|
|
|
(concat (format " %s " contents)
|
|
|
|
|
(when (memq 'right (org-export-table-cell-borders table-cell info))
|
|
|
|
|
(if (eq (plist-get info :ascii-charset) 'utf-8) "│" "|")))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Table Row
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-table-row (table-row contents info)
|
2012-04-21 07:52:08 +00:00
|
|
|
|
"Transcode a TABLE-ROW element from Org to ASCII.
|
|
|
|
|
CONTENTS is the row contents. INFO is a plist used as
|
|
|
|
|
a communication channel."
|
|
|
|
|
(when (eq (org-element-property :type table-row) 'standard)
|
|
|
|
|
(let ((build-hline
|
|
|
|
|
(function
|
|
|
|
|
(lambda (lcorner horiz vert rcorner)
|
|
|
|
|
(concat
|
|
|
|
|
(apply
|
|
|
|
|
'concat
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-element-map table-row 'table-cell
|
|
|
|
|
(lambda (cell)
|
|
|
|
|
(let ((width (org-ascii--table-cell-width cell info))
|
|
|
|
|
(borders (org-export-table-cell-borders cell info)))
|
|
|
|
|
(concat
|
|
|
|
|
;; In order to know if CELL starts the row, do
|
|
|
|
|
;; not compare it with the first cell in the
|
|
|
|
|
;; row as there might be a special column.
|
|
|
|
|
;; Instead, compare it with first exportable
|
|
|
|
|
;; cell, obtained with `org-element-map'.
|
|
|
|
|
(when (and (memq 'left borders)
|
|
|
|
|
(eq (org-element-map table-row 'table-cell
|
|
|
|
|
'identity info t)
|
|
|
|
|
cell))
|
|
|
|
|
lcorner)
|
|
|
|
|
(make-string (+ 2 width) (string-to-char horiz))
|
|
|
|
|
(cond
|
|
|
|
|
((not (memq 'right borders)) nil)
|
|
|
|
|
((eq (car (last (org-element-contents table-row))) cell)
|
|
|
|
|
rcorner)
|
|
|
|
|
(t vert)))))
|
|
|
|
|
info)) "\n"))))
|
2012-04-21 07:52:08 +00:00
|
|
|
|
(utf8p (eq (plist-get info :ascii-charset) 'utf-8))
|
|
|
|
|
(borders (org-export-table-cell-borders
|
|
|
|
|
(org-element-map table-row 'table-cell 'identity info t)
|
|
|
|
|
info)))
|
|
|
|
|
(concat (cond
|
|
|
|
|
((and (memq 'top borders) (or utf8p (memq 'above borders)))
|
|
|
|
|
(if utf8p (funcall build-hline "┍" "━" "┯" "┑")
|
|
|
|
|
(funcall build-hline "+" "-" "+" "+")))
|
|
|
|
|
((memq 'above borders)
|
|
|
|
|
(if utf8p (funcall build-hline "├" "─" "┼" "┤")
|
|
|
|
|
(funcall build-hline "+" "-" "+" "+"))))
|
|
|
|
|
(when (memq 'left borders) (if utf8p "│" "|"))
|
|
|
|
|
contents "\n"
|
|
|
|
|
(when (and (memq 'bottom borders) (or utf8p (memq 'below borders)))
|
|
|
|
|
(if utf8p (funcall build-hline "┕" "━" "┷" "┙")
|
|
|
|
|
(funcall build-hline "+" "-" "+" "+")))))))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
2012-04-29 00:23:09 +00:00
|
|
|
|
;;;; Timestamp
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-timestamp (timestamp contents info)
|
2012-04-29 00:23:09 +00:00
|
|
|
|
"Transcode a TIMESTAMP object from Org to ASCII.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-ascii-plain-text (org-timestamp-translate timestamp) info))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
;;;; Underline
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-underline (underline contents info)
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
|
|
|
|
"Transcode UNDERLINE from Org to ASCII.
|
|
|
|
|
CONTENTS is the text with underline markup. INFO is a plist
|
|
|
|
|
holding contextual information."
|
|
|
|
|
(format "_%s_" contents))
|
|
|
|
|
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
;;;; Verbatim
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-verbatim (verbatim contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Return a VERBATIM object from Org to ASCII.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-ascii-verbatim-format
|
org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
org-element-contents): New functions, renamed from, respecively
`org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
org-element-dynamic-block-interpreter,
org-element-footnote-definition-interpreter,
org-element-headline-interpreter,
org-element-inlinetask-interpreter, org-element-item-interpreter,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-interpreter,
org-element-comment-block-interpreter,
org-element-example-block-interpreter,
org-element-export-block-interpreter,
org-element-fixed-width-interpreter,
org-element-keyword-interpreter,
org-element-latex-environment-interpreter,
org-element-property-drawer-interpreter,
org-element-quote-section-interpreter,
org-element-src-block-interpreter, org-element-table-interpreter,
org-element-verse-block-interpreter,
org-element-emphasis-interpreter, org-element-entity-interpreter,
org-element-export-snippet-interpreter,
org-element-footnote-reference-interpreter,
org-element-inline-babel-call-interpreter,
org-element-inline-src-block-interpreter,
org-element-latex-fragment-interpreter,
org-element-link-interpreter, org-element-macro-interpreter,
org-element-statistics-cookie-interpreter,
org-element-subscript-interpreter,
org-element-superscript-interpreter,
org-element-time-stamp-interpreter,
org-element-verbatim-interpreter, org-element-map,
org-element-parse-elements, org-element-parse-objects,
org-element-interpret-data,
org-element-interpret--affiliated-keywords,
org-element-normalize-contents, org-element-swap-A-B,
org-element-backward, org-element-drag-backward,
org-element-drag-forward, org-element-forward,
org-element-mark-element, org-narrow-to-element,
org-transpose-elements, org-element-unindent-buffer,
org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
org-export-use-select-tags-p, org-export-get-min-level,
org-export-data, org-export-skip-p, org-export-interpret-p,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-relative-level,
org-export-last-sibling-p, org-export-inline-image-p,
org-export-resolve-fuzzy-link, org-export-resolve-id-link,
org-export-resolve-ref-link, org-export-resolve-coderef,
org-export-expand-macro, org-export-get-loc,
org-export-handle-code, org-export-collect-elements,
org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii--build-title, org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables,
org-e-ascii--unique-links, org-e-ascii--describe-links,
org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
org-e-ascii-entity, org-e-ascii-export-snippet,
org-e-ascii-export-block, org-e-ascii-fixed-width,
org-e-ascii-headline, org-e-ascii-horizontal-rule,
org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
org-e-ascii-item, org-e-ascii-keyword,
org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
org-e-ascii-statistics-cookie, org-e-ascii-subscript,
org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
org-e-latex-example-block, org-e-latex-export-snippet,
org-e-latex-export-block, org-e-latex-fixed-width,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-link--inline-image, org-e-latex-latex-fragment,
org-e-latex-latex-environment, org-e-latex-keyword,
org-e-latex-item, org-e-latex-inlinetask,
org-e-latex-inline-src-block, org-e-latex-special-block,
org-e-latex-radio-target, org-e-latex-quote-section,
org-e-latex-plain-list, org-e-latex-src-block,
org-e-latex-statistics-cookie, org-e-latex-table--format-string,
org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
org-e-publish-index-generate-theindex): Use new names.
2012-02-22 12:47:20 +00:00
|
|
|
|
(org-element-property :value verbatim)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Verse Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-verse-block (verse-block contents info)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Transcode a VERSE-BLOCK element from Org to ASCII.
|
2012-04-25 20:15:29 +00:00
|
|
|
|
CONTENTS is verse block contents. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((verse-width (org-ascii--current-text-width verse-block info)))
|
|
|
|
|
(org-ascii--indent-string
|
ox-ascii: Implement "justifyright" and "justifyleft" blocks
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
2014-05-21 21:37:00 +00:00
|
|
|
|
(org-ascii--justify-element contents verse-block info)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-ascii-quote-margin)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2012-11-23 17:43:05 +00:00
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2012-09-27 12:53:32 +00:00
|
|
|
|
;;; Filters
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-filter-headline-blank-lines (headline back-end info)
|
2013-02-23 12:47:44 +00:00
|
|
|
|
"Filter controlling number of blank lines after a headline.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
HEADLINE is a string representing a transcoded headline.
|
org-export: Filters now require a third argument: the communication channel
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-filter-headline-blank-lines):
Apply signature change.
* contrib/lisp/org-export.el (org-export-filter-apply-functions): Call
filter with the info channel as the third argument.
(org-export-data): Apply signature change
(org-export-filter-parse-tree-functions,
org-export-filter-final-output-functions,
org-export-filter-plain-text-functions,
org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-block-functions,
org-export-filter-quote-section-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-verse-block-functions,
org-export-filter-emphasis-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Update docstring.
2012-02-04 11:20:49 +00:00
|
|
|
|
BACK-END is symbol specifying back-end used for export. INFO is
|
|
|
|
|
plist containing the communication channel.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
This function only applies to `ascii' back-end. See
|
|
|
|
|
`org-ascii-headline-spacing' for information."
|
|
|
|
|
(if (not org-ascii-headline-spacing) headline
|
|
|
|
|
(let ((blanks (make-string (1+ (cdr org-ascii-headline-spacing)) ?\n)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
(replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" blanks headline))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-filter-paragraph-spacing (tree back-end info)
|
2012-09-27 12:53:32 +00:00
|
|
|
|
"Filter controlling number of blank lines between paragraphs.
|
|
|
|
|
|
|
|
|
|
TREE is the parse tree. BACK-END is the symbol specifying
|
|
|
|
|
back-end used for export. INFO is a plist used as
|
|
|
|
|
a communication channel.
|
|
|
|
|
|
2013-02-25 08:17:51 +00:00
|
|
|
|
See `org-ascii-paragraph-spacing' for information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(when (wholenump org-ascii-paragraph-spacing)
|
|
|
|
|
(org-element-map tree 'paragraph
|
|
|
|
|
(lambda (p)
|
|
|
|
|
(when (eq (org-element-type (org-export-get-next-element p info))
|
|
|
|
|
'paragraph)
|
|
|
|
|
(org-element-put-property
|
|
|
|
|
p :post-blank org-ascii-paragraph-spacing)))))
|
2012-09-27 12:53:32 +00:00
|
|
|
|
tree)
|
|
|
|
|
|
2013-02-25 08:17:51 +00:00
|
|
|
|
(defun org-ascii-filter-comment-spacing (tree backend info)
|
|
|
|
|
"Filter removing blank lines between comments.
|
|
|
|
|
TREE is the parse tree. BACK-END is the symbol specifying
|
|
|
|
|
back-end used for export. INFO is a plist used as
|
|
|
|
|
a communication channel."
|
|
|
|
|
(org-element-map tree '(comment comment-block)
|
|
|
|
|
(lambda (c)
|
|
|
|
|
(when (memq (org-element-type (org-export-get-next-element c info))
|
|
|
|
|
'(comment comment-block))
|
|
|
|
|
(org-element-put-property c :post-blank 0))))
|
|
|
|
|
tree)
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
|
2012-10-08 12:20:56 +00:00
|
|
|
|
;;; End-user functions
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2012-07-20 11:11:44 +00:00
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-export-as-ascii
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(&optional async subtreep visible-only body-only ext-plist)
|
2012-07-20 11:11:44 +00:00
|
|
|
|
"Export current buffer to a text buffer.
|
|
|
|
|
|
|
|
|
|
If narrowing is active in the current buffer, only export its
|
|
|
|
|
narrowed part.
|
|
|
|
|
|
|
|
|
|
If a region is active, export that region.
|
|
|
|
|
|
2012-12-02 16:24:19 +00:00
|
|
|
|
A non-nil optional argument ASYNC means the process should happen
|
|
|
|
|
asynchronously. The resulting buffer should be accessible
|
|
|
|
|
through the `org-export-stack' interface.
|
|
|
|
|
|
2012-07-20 11:11:44 +00:00
|
|
|
|
When optional argument SUBTREEP is non-nil, export the sub-tree
|
|
|
|
|
at point, extracting information from the headline properties
|
|
|
|
|
first.
|
|
|
|
|
|
|
|
|
|
When optional argument VISIBLE-ONLY is non-nil, don't export
|
|
|
|
|
contents of hidden elements.
|
|
|
|
|
|
2013-02-13 12:55:49 +00:00
|
|
|
|
When optional argument BODY-ONLY is non-nil, strip title and
|
|
|
|
|
table of contents from output.
|
2012-07-20 11:11:44 +00:00
|
|
|
|
|
|
|
|
|
EXT-PLIST, when provided, is a property list with external
|
|
|
|
|
parameters overriding Org default settings, but still inferior to
|
|
|
|
|
file-local settings.
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
Export is done in a buffer named \"*Org ASCII Export*\", which
|
2012-07-26 12:51:45 +00:00
|
|
|
|
will be displayed when `org-export-show-temporary-export-buffer'
|
|
|
|
|
is non-nil."
|
2012-07-20 11:11:44 +00:00
|
|
|
|
(interactive)
|
Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 08:35:42 +00:00
|
|
|
|
(org-export-to-buffer 'ascii "*Org ASCII Export*"
|
|
|
|
|
async subtreep visible-only body-only ext-plist (lambda () (text-mode))))
|
2012-07-20 11:11:44 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-export-to-ascii
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(&optional async subtreep visible-only body-only ext-plist)
|
2012-01-07 13:01:25 +00:00
|
|
|
|
"Export current buffer to a text file.
|
|
|
|
|
|
|
|
|
|
If narrowing is active in the current buffer, only export its
|
|
|
|
|
narrowed part.
|
|
|
|
|
|
|
|
|
|
If a region is active, export that region.
|
|
|
|
|
|
2012-12-02 16:24:19 +00:00
|
|
|
|
A non-nil optional argument ASYNC means the process should happen
|
|
|
|
|
asynchronously. The resulting file should be accessible through
|
|
|
|
|
the `org-export-stack' interface.
|
|
|
|
|
|
2012-01-07 13:01:25 +00:00
|
|
|
|
When optional argument SUBTREEP is non-nil, export the sub-tree
|
|
|
|
|
at point, extracting information from the headline properties
|
|
|
|
|
first.
|
|
|
|
|
|
|
|
|
|
When optional argument VISIBLE-ONLY is non-nil, don't export
|
|
|
|
|
contents of hidden elements.
|
|
|
|
|
|
2013-02-13 12:55:49 +00:00
|
|
|
|
When optional argument BODY-ONLY is non-nil, strip title and
|
|
|
|
|
table of contents from output.
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
|
|
|
|
EXT-PLIST, when provided, is a property list with external
|
|
|
|
|
parameters overriding Org default settings, but still inferior to
|
|
|
|
|
file-local settings.
|
|
|
|
|
|
|
|
|
|
Return output file's name."
|
|
|
|
|
(interactive)
|
Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 08:35:42 +00:00
|
|
|
|
(let ((file (org-export-output-file-name ".txt" subtreep)))
|
|
|
|
|
(org-export-to-file 'ascii file
|
|
|
|
|
async subtreep visible-only body-only ext-plist)))
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2012-10-08 12:20:56 +00:00
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-publish-to-ascii (plist filename pub-dir)
|
2012-10-08 12:20:56 +00:00
|
|
|
|
"Publish an Org file to ASCII.
|
|
|
|
|
|
|
|
|
|
FILENAME is the filename of the Org file to be published. PLIST
|
|
|
|
|
is the property list for the given project. PUB-DIR is the
|
|
|
|
|
publishing directory.
|
|
|
|
|
|
|
|
|
|
Return output file name."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-publish-org-to
|
|
|
|
|
'ascii filename ".txt" `(:ascii-charset ascii ,@plist) pub-dir))
|
2012-10-08 12:20:56 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-publish-to-latin1 (plist filename pub-dir)
|
2012-10-08 12:20:56 +00:00
|
|
|
|
"Publish an Org file to Latin-1.
|
|
|
|
|
|
|
|
|
|
FILENAME is the filename of the Org file to be published. PLIST
|
|
|
|
|
is the property list for the given project. PUB-DIR is the
|
|
|
|
|
publishing directory.
|
|
|
|
|
|
|
|
|
|
Return output file name."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-publish-org-to
|
|
|
|
|
'ascii filename ".txt" `(:ascii-charset latin1 ,@plist) pub-dir))
|
2012-10-08 12:20:56 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-ascii-publish-to-utf8 (plist filename pub-dir)
|
2012-10-08 12:20:56 +00:00
|
|
|
|
"Publish an org file to UTF-8.
|
|
|
|
|
|
|
|
|
|
FILENAME is the filename of the Org file to be published. PLIST
|
|
|
|
|
is the property list for the given project. PUB-DIR is the
|
|
|
|
|
publishing directory.
|
|
|
|
|
|
|
|
|
|
Return output file name."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-publish-org-to
|
|
|
|
|
'ascii filename ".txt" `(:ascii-charset utf-8 ,@plist) pub-dir))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(provide 'ox-ascii)
|
2012-10-08 12:20:56 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; Local variables:
|
|
|
|
|
;; generated-autoload-file: "org-loaddefs.el"
|
Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.
* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 15:34:16 +00:00
|
|
|
|
;; coding: utf-8-emacs
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; End:
|
2012-01-07 13:01:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;;; ox-ascii.el ends here
|