Prefer "backend" over "back-end"
* doc/org-manual.org (Exporting): Add cindex entry for both "backend" and "back-end" for better searchability. All other changes are trivial. Note that `org-element-export-snippet-parser' will still use :back-end property. So will ox.el in INFO channel.
This commit is contained in:
parent
9440a29828
commit
f81ba451a7
|
@ -2223,8 +2223,8 @@ compatible with XHTML 1.0 strict standard.
|
|||
exports to =myfile.html=, overwriting without warning. {{{kbd(C-c
|
||||
C-e h o)}}} exports to HTML and opens it in a web browser.
|
||||
|
||||
The HTML export back-end transforms =<= and =>= to =<= and =>=.
|
||||
To include raw HTML code in the Org file so the HTML export back-end
|
||||
The HTML export backend transforms =<= and =>= to =<= and =>=.
|
||||
To include raw HTML code in the Org file so the HTML export backend
|
||||
can insert that HTML code in the output, use this inline syntax:
|
||||
=@@html:...@@=. For example:
|
||||
|
||||
|
@ -2245,7 +2245,7 @@ For larger raw HTML code blocks, use these HTML export code blocks:
|
|||
:DESCRIPTION: Exporting to @LaTeX{} and processing to PDF.
|
||||
:END:
|
||||
|
||||
The LaTeX export back-end can handle complex documents, incorporate
|
||||
The LaTeX export backend can handle complex documents, incorporate
|
||||
standard or custom LaTeX document classes, generate documents using
|
||||
alternate LaTeX engines, and produce fully linked PDF files with
|
||||
indexes, bibliographies, and tables of contents, destined for
|
||||
|
@ -2269,7 +2269,7 @@ The class must be listed in ~org-latex-classes~.
|
|||
Export as LaTeX file and convert it to PDF, then open the PDF using
|
||||
the default viewer.
|
||||
|
||||
The LaTeX export back-end can insert any arbitrary LaTeX code, see
|
||||
The LaTeX export backend can insert any arbitrary LaTeX code, see
|
||||
[[*Embedded LaTeX]]. There are three ways to embed such code in the Org
|
||||
file and they all use different quoting syntax.
|
||||
|
||||
|
@ -2281,7 +2281,7 @@ Inserting as one or more keyword lines in the Org file:
|
|||
|
||||
: #+LATEX: any arbitrary LaTeX code
|
||||
|
||||
Inserting as an export block in the Org file, where the back-end
|
||||
Inserting as an export block in the Org file, where the backend
|
||||
exports any code between begin and end markers:
|
||||
|
||||
#+begin_example
|
||||
|
@ -2297,7 +2297,7 @@ exports any code between begin and end markers:
|
|||
|
||||
A large part of Org mode's interoperability success is its ability to
|
||||
easily export to or import from external applications. The iCalendar
|
||||
export back-end takes calendar data from Org files and exports to the
|
||||
export backend takes calendar data from Org files and exports to the
|
||||
standard iCalendar format.
|
||||
|
||||
- {{{kbd(C-c C-e c f)}}} ::
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
;;; oc-basic.el --- basic back-end for citations -*- lexical-binding: t; -*-
|
||||
;;; oc-basic.el --- basic backend for citations -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -330,7 +330,7 @@ FIELD is a symbol. ENTRY-OR-KEY is either an association list, as returned by
|
|||
|
||||
Optional argument INFO is the export state, as a property list.
|
||||
|
||||
Return value may be nil or a string. If current export back-end is derived
|
||||
Return value may be nil or a string. If current export backend is derived
|
||||
from `latex', return a raw string instead, unless optional argument RAW is
|
||||
non-nil.
|
||||
|
||||
|
@ -716,7 +716,7 @@ export communication channel, as a property list."
|
|||
(defun org-cite-basic-export-bibliography (keys _files style _props backend info)
|
||||
"Generate bibliography.
|
||||
KEYS is the list of cited keys, as strings. STYLE is the expected bibliography
|
||||
style, as a string. BACKEND is the export back-end, as a symbol. INFO is the
|
||||
style, as a string. BACKEND is the export backend, as a symbol. INFO is the
|
||||
export state, as a property list."
|
||||
(mapconcat
|
||||
(lambda (entry)
|
||||
|
|
|
@ -184,8 +184,8 @@ looks for style files in this directory, too."
|
|||
:safe #'booleanp)
|
||||
|
||||
(defcustom org-cite-csl-no-citelinks-backends '(ascii)
|
||||
"List of export back-ends for which cite linking is disabled.
|
||||
Cite linking for export back-ends derived from any of the back-ends listed here,
|
||||
"List of export backends for which cite linking is disabled.
|
||||
Cite linking for export backends derived from any of the backends listed here,
|
||||
is also disabled."
|
||||
:group 'org-cite
|
||||
:package-version '(Org . "9.5")
|
||||
|
|
34
lisp/oc.el
34
lisp/oc.el
|
@ -46,8 +46,8 @@
|
|||
;; The "export" capability is slightly more involved as one need to
|
||||
;; select the processor providing it, but may also provide a default
|
||||
;; style for citations and bibliography. Also, the choice of an
|
||||
;; export processor may depend of the current export back-end. The
|
||||
;; association between export back-ends and triplets of parameters can
|
||||
;; export processor may depend of the current export backend. The
|
||||
;; association between export backends and triplets of parameters can
|
||||
;; be set in `org-cite-export-processors' variable, or in a document,
|
||||
;; through the "cite_export" keyword.
|
||||
|
||||
|
@ -143,12 +143,12 @@ File names must be absolute."
|
|||
|
||||
When nil, citations and bibliography are not exported.
|
||||
|
||||
When non-nil, the value is an association list between export back-ends and
|
||||
When non-nil, the value is an association list between export backends and
|
||||
citation export processors:
|
||||
|
||||
(BACK-END . PROCESSOR)
|
||||
(BACKEND . PROCESSOR)
|
||||
|
||||
where BACK-END is the name of an export back-end or t, and PROCESSOR is a
|
||||
where BACKEND is the name of an export backend or t, and PROCESSOR is a
|
||||
triplet following the pattern
|
||||
|
||||
(NAME BIBLIOGRAPHY-STYLE CITATION-STYLE)
|
||||
|
@ -160,7 +160,7 @@ exporting a citation), as a string or nil. Both BIBLIOGRAPHY-STYLE and
|
|||
CITATION-STYLE are optional. NAME is mandatory.
|
||||
|
||||
The export process selects the citation processor associated to the current
|
||||
export back-end, or the most specific back-end the current one is derived from,
|
||||
export backend, or the most specific backend the current one is derived from,
|
||||
or, if all are inadequate, to the processor associated to t. For example, with
|
||||
the following value
|
||||
|
||||
|
@ -168,9 +168,9 @@ the following value
|
|||
(latex biblatex)
|
||||
(t csl))
|
||||
|
||||
exporting with `beamer' or any back-end derived from it will use `natbib',
|
||||
whereas exporting with `latex' or any back-end derived from it but different
|
||||
from `beamer' will use `biblatex' processor. Any other back-end, such as
|
||||
exporting with `beamer' or any backend derived from it will use `natbib',
|
||||
whereas exporting with `latex' or any backend derived from it but different
|
||||
from `beamer' will use `biblatex' processor. Any other backend, such as
|
||||
`html', will use `csl' processor.
|
||||
|
||||
CITATION-STYLE is overridden by adding a style to any citation object. A nil
|
||||
|
@ -187,7 +187,7 @@ or
|
|||
#+CITE_EXPORT: basic
|
||||
|
||||
In that case, `basic' processor is used on every export, independently on the
|
||||
back-end."
|
||||
backend."
|
||||
:group 'org-cite
|
||||
:package-version '(Org . "9.5")
|
||||
:type '(choice (const :tag "No export" nil)
|
||||
|
@ -345,7 +345,7 @@ optional keys can be set:
|
|||
arguments: the list of citation keys used in the document, as
|
||||
strings, a list of bibliography files, the style, as a string
|
||||
or nil, the local properties, as a property list, the export
|
||||
back-end, as a symbol, and the communication channel, as a
|
||||
backend, as a symbol, and the communication channel, as a
|
||||
property list.
|
||||
|
||||
It is called at each \"print_bibliography\" keyword in the
|
||||
|
@ -358,7 +358,7 @@ optional keys can be set:
|
|||
|
||||
Function rendering citations. It is called with four
|
||||
arguments: a citation object, the style, as a pair, the
|
||||
export back-end, as a symbol, and the communication channel,
|
||||
export backend, as a symbol, and the communication channel,
|
||||
as a property list.
|
||||
|
||||
It is called on each citation object in the parse tree. It
|
||||
|
@ -373,7 +373,7 @@ optional keys can be set:
|
|||
six arguments: the output, as a string, a list of citation
|
||||
keys used in the document, a list of bibliography files, the
|
||||
expected bibliography style, as a string or nil, the export
|
||||
back-end, as a symbol, and the communication channel, as a
|
||||
backend, as a symbol, and the communication channel, as a
|
||||
property list.
|
||||
|
||||
It must return a string, which will become the final output
|
||||
|
@ -654,7 +654,7 @@ in the current buffer. Positions include leading \"@\" character."
|
|||
(defun org-cite-main-affixes (citation)
|
||||
"Return main affixes for CITATION object.
|
||||
|
||||
Some export back-ends only support a single pair of affixes per
|
||||
Some export backends only support a single pair of affixes per
|
||||
citation, even if it contains multiple keys. This function
|
||||
decides what affixes are the most appropriate.
|
||||
|
||||
|
@ -1279,12 +1279,12 @@ side-effect."
|
|||
;; Value is an alist. It must come from
|
||||
;; `org-cite-export-processors' variable. Find the most
|
||||
;; appropriate processor according to current export
|
||||
;; back-end.
|
||||
;; backend.
|
||||
((and (pred consp) alist)
|
||||
(let* ((backend (plist-get info :back-end))
|
||||
(candidates
|
||||
;; Limit candidates to processors associated to
|
||||
;; back-ends derived from or equal to the current
|
||||
;; backends derived from or equal to the current
|
||||
;; one.
|
||||
(sort (seq-filter
|
||||
(pcase-lambda (`(,key . ,_))
|
||||
|
@ -1336,7 +1336,7 @@ selected citation processor."
|
|||
|
||||
(defun org-cite-export-bibliography (keyword _ info)
|
||||
"Return bibliography associated to \"print_bibliography\" KEYWORD.
|
||||
BACKEND is the export back-end, as a symbol. INFO is a plist
|
||||
BACKEND is the export backend, as a symbol. INFO is a plist
|
||||
used as a communication channel."
|
||||
(pcase (plist-get info :cite-export)
|
||||
('nil nil)
|
||||
|
|
|
@ -114,11 +114,11 @@ below.
|
|||
Function that accepts four arguments:
|
||||
- the path, as a string,
|
||||
- the description as a string, or nil,
|
||||
- the export back-end,
|
||||
- the export backend,
|
||||
- the export communication channel, as a plist.
|
||||
|
||||
When nil, export for that type of link is delegated to the
|
||||
back-end.
|
||||
backend.
|
||||
|
||||
`:store'
|
||||
|
||||
|
|
|
@ -3242,13 +3242,13 @@ Assume point is at the beginning of the snippet."
|
|||
(re-search-forward "@@" nil t)
|
||||
(match-beginning 0)))))
|
||||
(let* ((begin (match-beginning 0))
|
||||
(back-end (match-string-no-properties 1))
|
||||
(backend (match-string-no-properties 1))
|
||||
(value (buffer-substring-no-properties
|
||||
(match-end 0) contents-end))
|
||||
(post-blank (skip-chars-forward " \t"))
|
||||
(end (point)))
|
||||
(list 'export-snippet
|
||||
(list :back-end back-end
|
||||
(list :back-end backend
|
||||
:value value
|
||||
:begin begin
|
||||
:end end
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
;; - deprecated export block syntax,
|
||||
;; - deprecated Babel header syntax,
|
||||
;; - missing language in source blocks,
|
||||
;; - missing back-end in export blocks,
|
||||
;; - missing backend in export blocks,
|
||||
;; - invalid Babel call blocks,
|
||||
;; - NAME values with a colon,
|
||||
;; - wrong babel headers,
|
||||
|
@ -509,7 +509,7 @@ Use :header-args: instead"
|
|||
(lambda (b)
|
||||
(unless (org-element-property :type b)
|
||||
(list (org-element-property :post-affiliated b)
|
||||
"Missing back-end in export block")))))
|
||||
"Missing backend in export block")))))
|
||||
|
||||
(defun org-lint-invalid-babel-call-block (ast)
|
||||
(org-element-map ast 'babel-call
|
||||
|
@ -1308,7 +1308,7 @@ Use \"export %s\" instead"
|
|||
:categories '(babel))
|
||||
|
||||
(org-lint-add-checker 'missing-backend-in-export-block
|
||||
"Report missing back-end in export blocks"
|
||||
"Report missing backend in export blocks"
|
||||
#'org-lint-missing-backend-in-export-block
|
||||
:categories '(export))
|
||||
|
||||
|
|
|
@ -3334,7 +3334,7 @@ Valid parameters are:
|
|||
|
||||
:backend, :raw
|
||||
|
||||
Export back-end used as a basis to transcode elements of the
|
||||
Export backend used as a basis to transcode elements of the
|
||||
list, when no specific parameter applies to it. It is also
|
||||
used to translate its contents. You can prevent this by
|
||||
setting :raw property to a non-nil value.
|
||||
|
|
|
@ -306,7 +306,7 @@ When completing for #+STARTUP, for example, this function returns
|
|||
"creator:" "date:" "d:" "email:" "*:" "e:" "::" "f:"
|
||||
"inline:" "tex:" "p:" "pri:" "':" "-:" "stat:" "^:" "toc:"
|
||||
"|:" "tags:" "tasks:" "<:" "todo:")
|
||||
;; OPTION items from registered back-ends.
|
||||
;; OPTION items from registered backends.
|
||||
(let (items)
|
||||
(dolist (backend (bound-and-true-p
|
||||
org-export-registered-backends))
|
||||
|
|
|
@ -5615,7 +5615,7 @@ Valid parameters are:
|
|||
|
||||
:backend, :raw
|
||||
|
||||
Export back-end used as a basis to transcode elements of the
|
||||
Export backend used as a basis to transcode elements of the
|
||||
table, when no specific parameter applies to it. It is also
|
||||
used to translate cells contents. You can prevent this by
|
||||
setting :raw property to a non-nil value.
|
||||
|
@ -5707,7 +5707,7 @@ This may be either a string or a function of two arguments:
|
|||
(require 'ox)
|
||||
(let* ((backend (plist-get params :backend))
|
||||
(custom-backend
|
||||
;; Build a custom back-end according to PARAMS. Before
|
||||
;; Build a custom backend according to PARAMS. Before
|
||||
;; defining a translator, check if there is anything to do.
|
||||
;; When there isn't, let BACKEND handle the element.
|
||||
(org-export-create-backend
|
||||
|
@ -5717,7 +5717,7 @@ This may be either a string or a function of two arguments:
|
|||
(table-row . ,(org-table--to-generic-row params))
|
||||
(table-cell . ,(org-table--to-generic-cell params))
|
||||
;; Macros are not going to be expanded. However, no
|
||||
;; regular back-end has a transcoder for them. We
|
||||
;; regular backend has a transcoder for them. We
|
||||
;; provide one so they are not ignored, but displayed
|
||||
;; as-is instead.
|
||||
(macro . (lambda (m c i) (org-element-macro-interpreter m nil))))))
|
||||
|
@ -5735,7 +5735,7 @@ This may be either a string or a function of two arguments:
|
|||
(princ "| ") (dolist (c e) (princ c) (princ " |"))
|
||||
(princ "\n")))))
|
||||
(org-element-cache-reset)
|
||||
;; Add back-end specific filters, but not user-defined ones. In
|
||||
;; Add backend specific filters, but not user-defined ones. In
|
||||
;; particular, make sure to call parse-tree filters on the
|
||||
;; table.
|
||||
(setq info
|
||||
|
@ -5794,7 +5794,7 @@ This may be either a string or a function of two arguments:
|
|||
;; We use a low-level mechanism to export DATA so as to skip all
|
||||
;; usual pre-processing and post-processing, i.e., hooks, Babel
|
||||
;; code evaluation, include keywords and macro expansion. Only
|
||||
;; back-end specific filters are retained.
|
||||
;; backend specific filters are retained.
|
||||
(let ((output (org-export-data-with-backend data custom-backend info)))
|
||||
;; Remove final newline.
|
||||
(if (org-string-nw-p output) (substring-no-properties output 0 -1) ""))))
|
||||
|
|
24
lisp/org.el
24
lisp/org.el
|
@ -812,7 +812,7 @@ For export specific modules, see also `org-export-backends'."
|
|||
(declare-function org-export-derived-backend-p "ox" (backend &rest backends))
|
||||
(declare-function org-export-backend-name "ox" (backend) t)
|
||||
(defcustom org-export-backends '(ascii html icalendar latex odt)
|
||||
"List of export back-ends that should be always available.
|
||||
"List of export backends that should be always available.
|
||||
|
||||
If a description starts with <C>, the file is not part of Emacs and Org mode,
|
||||
so loading it will require that you have properly installed org-contrib
|
||||
|
@ -844,12 +844,12 @@ value of the variable, after updating it:
|
|||
(dolist (backend val)
|
||||
(cond
|
||||
((not (load (format \"ox-%s\" backend) t t))
|
||||
(message \"Problems while trying to load export back-end \\=`%s\\='\"
|
||||
(message \"Problems while trying to load export backend \\=`%s\\='\"
|
||||
backend))
|
||||
((not (memq backend new-list)) (push backend new-list))))
|
||||
(set-default \\='org-export-backends new-list)))
|
||||
|
||||
Adding a back-end to this list will also pull the back-end it
|
||||
Adding a backend to this list will also pull the backend it
|
||||
depends on, if any."
|
||||
:group 'org
|
||||
:group 'org-export
|
||||
|
@ -858,9 +858,9 @@ depends on, if any."
|
|||
:initialize 'custom-initialize-set
|
||||
:set (lambda (var val)
|
||||
(if (not (featurep 'ox)) (set-default-toplevel-value var val)
|
||||
;; Any back-end not required anymore (not present in VAL and not
|
||||
;; a parent of any back-end in the new value) is removed from the
|
||||
;; list of registered back-ends.
|
||||
;; Any backend not required anymore (not present in VAL and not
|
||||
;; a parent of any backend in the new value) is removed from the
|
||||
;; list of registered backends.
|
||||
(setq org-export-registered-backends
|
||||
(cl-remove-if-not
|
||||
(lambda (backend)
|
||||
|
@ -871,14 +871,14 @@ depends on, if any."
|
|||
(and (org-export-derived-backend-p b name)
|
||||
(throw 'parentp t)))))))
|
||||
org-export-registered-backends))
|
||||
;; Now build NEW-LIST of both new back-ends and required
|
||||
;; Now build NEW-LIST of both new backends and required
|
||||
;; parents.
|
||||
(let ((new-list (mapcar #'org-export-backend-name
|
||||
org-export-registered-backends)))
|
||||
(dolist (backend val)
|
||||
(cond
|
||||
((not (load (format "ox-%s" backend) t t))
|
||||
(message "Problems while trying to load export back-end `%s'"
|
||||
(message "Problems while trying to load export backend `%s'"
|
||||
backend))
|
||||
((not (memq backend new-list)) (push backend new-list))))
|
||||
;; Set VAR to that list with fixed dependencies.
|
||||
|
@ -906,7 +906,7 @@ depends on, if any."
|
|||
(eval-after-load 'ox
|
||||
'(dolist (backend org-export-backends)
|
||||
(condition-case nil (require (intern (format "ox-%s" backend)))
|
||||
(error (message "Problems while trying to load export back-end `%s'"
|
||||
(error (message "Problems while trying to load export backend `%s'"
|
||||
backend)))))
|
||||
|
||||
(defcustom org-support-shift-select nil
|
||||
|
@ -8868,15 +8868,15 @@ This function can be used in a hook."
|
|||
(defun org-get-export-keywords ()
|
||||
"Return a list of all currently understood export keywords.
|
||||
Export keywords include options, block names, attributes and
|
||||
keywords relative to each registered export back-end."
|
||||
keywords relative to each registered export backend."
|
||||
(let (keywords)
|
||||
(dolist (backend
|
||||
(bound-and-true-p org-export-registered-backends)
|
||||
(delq nil keywords))
|
||||
;; Back-end name (for keywords, like #+LATEX:)
|
||||
;; Backend name (for keywords, like #+LATEX:)
|
||||
(push (upcase (symbol-name (org-export-backend-name backend))) keywords)
|
||||
(dolist (option-entry (org-export-backend-options backend))
|
||||
;; Back-end options.
|
||||
;; Backend options.
|
||||
(push (nth 1 option-entry) keywords)))))
|
||||
|
||||
(defconst org-options-keywords
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-ascii.el --- ASCII Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-ascii.el --- ASCII Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This library implements an ASCII back-end for Org generic exporter.
|
||||
;; This library implements an ASCII backend for Org generic exporter.
|
||||
;; See Org manual for more information.
|
||||
|
||||
;;; Code:
|
||||
|
@ -42,7 +42,7 @@
|
|||
(declare-function org-back-to-heading "org" (&optional invisible-ok))
|
||||
(declare-function org-next-visible-heading "org" (arg))
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
;;
|
||||
;; The following setting won't allow modifying preferred charset
|
||||
;; through a buffer keyword or an option item, but, since the property
|
||||
|
@ -2048,10 +2048,10 @@ contextual information."
|
|||
"Filter controlling number of blank lines after a headline.
|
||||
|
||||
HEADLINE is a string representing a transcoded headline. BACKEND
|
||||
is symbol specifying back-end used for export. INFO is plist
|
||||
is symbol specifying backend used for export. INFO is plist
|
||||
containing the communication channel.
|
||||
|
||||
This function only applies to `ascii' back-end. See
|
||||
This function only applies to `ascii' backend. See
|
||||
`org-ascii-headline-spacing' for information."
|
||||
(let ((headline-spacing (plist-get info :ascii-headline-spacing)))
|
||||
(if (not headline-spacing) headline
|
||||
|
@ -2062,7 +2062,7 @@ This function only applies to `ascii' back-end. See
|
|||
"Filter controlling number of blank lines between paragraphs.
|
||||
|
||||
TREE is the parse tree. BACKEND is the symbol specifying
|
||||
back-end used for export. INFO is a plist used as
|
||||
backend used for export. INFO is a plist used as
|
||||
a communication channel.
|
||||
|
||||
See `org-ascii-paragraph-spacing' for information."
|
||||
|
@ -2078,7 +2078,7 @@ See `org-ascii-paragraph-spacing' for information."
|
|||
(defun org-ascii-filter-comment-spacing (tree _backend info)
|
||||
"Filter removing blank lines between comments.
|
||||
TREE is the parse tree. BACKEND is the symbol specifying
|
||||
back-end used for export. INFO is a plist used as
|
||||
backend used for export. INFO is a plist used as
|
||||
a communication channel."
|
||||
(org-element-map tree '(comment comment-block)
|
||||
(lambda (c)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-beamer.el --- Beamer Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-beamer.el --- Beamer Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2007-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This library implements both a Beamer back-end, derived from the
|
||||
;; This library implements both a Beamer backend, derived from the
|
||||
;; LaTeX one and a minor mode easing structure edition of the
|
||||
;; document. See Org manual for more information.
|
||||
|
||||
|
@ -166,7 +166,7 @@ which is replaced with the subtitle."
|
|||
("ignoreheading" "i")
|
||||
("note" "n")
|
||||
("noteNH" "N"))
|
||||
"Alist of environments treated in a special way by the back-end.
|
||||
"Alist of environments treated in a special way by the backend.
|
||||
Keys are environment names, as strings, values are bindings used
|
||||
in `org-beamer-select-environment'. Environments listed here,
|
||||
along with their binding, are hard coded and cannot be modified
|
||||
|
@ -229,7 +229,7 @@ Return overlay specification, as a string, or nil."
|
|||
|
||||
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
|
||||
(org-export-define-derived-backend 'beamer 'latex
|
||||
:menu-entry
|
||||
|
@ -377,7 +377,7 @@ CONTENTS holds the contents of the headline. INFO is a plist
|
|||
used as a communication channel."
|
||||
(let ((latex-headline
|
||||
(org-export-with-backend
|
||||
;; We create a temporary export back-end which behaves the
|
||||
;; We create a temporary export backend which behaves the
|
||||
;; same as current one, but adds "\protect" in front of the
|
||||
;; output of some objects.
|
||||
(org-export-create-backend
|
||||
|
@ -715,7 +715,7 @@ channel."
|
|||
(let ((key (org-element-property :key keyword))
|
||||
(value (org-element-property :value keyword)))
|
||||
;; Handle specifically BEAMER and TOC (headlines only) keywords.
|
||||
;; Otherwise, fallback to `latex' back-end.
|
||||
;; Otherwise, fallback to `latex' backend.
|
||||
(cond
|
||||
((equal key "BEAMER") value)
|
||||
((and (equal key "TOC") (string-match "\\<headlines\\>" value))
|
||||
|
@ -808,7 +808,7 @@ contextual information."
|
|||
|
||||
;;;; Template
|
||||
;;
|
||||
;; Template used is similar to the one used in `latex' back-end,
|
||||
;; Template used is similar to the one used in `latex' backend,
|
||||
;; excepted for the table of contents and Beamer themes.
|
||||
|
||||
(defun org-beamer-template (contents info)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-html.el --- HTML Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-html.el --- HTML Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2011-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements a HTML back-end for Org generic exporter.
|
||||
;; This library implements a HTML backend for Org generic exporter.
|
||||
;; See Org manual for more information.
|
||||
|
||||
;;; Code:
|
||||
|
@ -55,7 +55,7 @@
|
|||
(defvar htmlize-output-type)
|
||||
(defvar htmlize-css-name-prefix)
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
|
||||
(org-export-define-backend 'html
|
||||
'((bold . org-html-bold)
|
||||
|
@ -544,7 +544,7 @@ Option settings will replace the %MANAGER-OPTIONS cookie."
|
|||
(defun org-html-infojs-install-script (exp-plist _backend)
|
||||
"Install script in export options when appropriate.
|
||||
EXP-PLIST is a plist containing export options. BACKEND is the
|
||||
export back-end currently used."
|
||||
export backend currently used."
|
||||
(unless (or (memq 'body-only (plist-get exp-plist :export-options))
|
||||
(not (plist-get exp-plist :html-use-infojs))
|
||||
(and (eq (plist-get exp-plist :html-use-infojs) 'when-configured)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-icalendar.el --- iCalendar Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-icalendar.el --- iCalendar Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This library implements an iCalendar back-end for Org generic
|
||||
;; This library implements an iCalendar backend for Org generic
|
||||
;; exporter. See Org manual for more information.
|
||||
;;
|
||||
;; It is expected to conform to RFC 5545.
|
||||
|
@ -48,7 +48,7 @@
|
|||
;;; User-Configurable Variables
|
||||
|
||||
(defgroup org-export-icalendar nil
|
||||
"Options specific for iCalendar export back-end."
|
||||
"Options specific for iCalendar export backend."
|
||||
:tag "Org Export iCalendar"
|
||||
:group 'org-export)
|
||||
|
||||
|
@ -96,7 +96,7 @@ and will fire at the event start."
|
|||
(defcustom org-icalendar-exclude-tags nil
|
||||
"Tags that exclude a tree from export.
|
||||
This variable allows specifying different exclude tags from other
|
||||
back-ends. It can also be set with the ICALENDAR_EXCLUDE_TAGS
|
||||
backends. It can also be set with the ICALENDAR_EXCLUDE_TAGS
|
||||
keyword."
|
||||
:group 'org-export-icalendar
|
||||
:type '(repeat (string :tag "Tag")))
|
||||
|
@ -305,7 +305,7 @@ re-read the iCalendar file.")
|
|||
|
||||
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
|
||||
(org-export-define-derived-backend 'icalendar 'ascii
|
||||
:translate-alist '((clock . nil)
|
||||
|
@ -561,10 +561,10 @@ runs `org-icalendar-after-save-hook'."
|
|||
|
||||
;;; Filters
|
||||
|
||||
(defun org-icalendar-clear-blank-lines (headline _back-end _info)
|
||||
(defun org-icalendar-clear-blank-lines (headline _backend _info)
|
||||
"Remove blank lines in HEADLINE export.
|
||||
HEADLINE is a string representing a transcoded headline.
|
||||
BACK-END and INFO are ignored."
|
||||
BACKEND and INFO are ignored."
|
||||
(replace-regexp-in-string "^\\(?:[ \t]*\n\\)+" "" headline))
|
||||
|
||||
|
||||
|
@ -936,7 +936,7 @@ Return ICS file name."
|
|||
(let ((file (buffer-file-name (buffer-base-buffer))))
|
||||
(when (and file org-icalendar-store-UID)
|
||||
(org-icalendar-create-uid file 'warn-user)))
|
||||
;; Export part. Since this back-end is backed up by `ascii', ensure
|
||||
;; Export part. Since this backend is backed up by `ascii', ensure
|
||||
;; links will not be collected at the end of sections.
|
||||
(let ((outfile (org-export-output-file-name ".ics" subtreep)))
|
||||
(org-export-to-file 'icalendar outfile
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-koma-letter.el --- KOMA Scrlttr2 Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-koma-letter.el --- KOMA Scrlttr2 Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2007-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This library implements a KOMA Scrlttr2 back-end, derived from the
|
||||
;; This library implements a KOMA Scrlttr2 backend, derived from the
|
||||
;; LaTeX one.
|
||||
;;
|
||||
;; Depending on the desired output format, three commands are provided
|
||||
|
@ -34,8 +34,8 @@
|
|||
;; `org-koma-letter-export-to-latex' ("tex" file) and
|
||||
;; `org-koma-letter-export-to-pdf' ("pdf" file).
|
||||
;;
|
||||
;; On top of buffer keywords supported by `latex' back-end (see
|
||||
;; `org-latex-packages-alist'), this back-end introduces the following
|
||||
;; On top of buffer keywords supported by `latex' backend (see
|
||||
;; `org-latex-packages-alist'), this backend introduces the following
|
||||
;; keywords:
|
||||
;; - CLOSING: see `org-koma-letter-closing',
|
||||
;; - FROM_ADDRESS: see `org-koma-letter-from-address',
|
||||
|
@ -466,7 +466,7 @@ e.g. \"title-subject:t\"."
|
|||
"Holds special content temporarily.")
|
||||
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
|
||||
(org-export-define-derived-backend 'koma-letter 'latex
|
||||
:options-alist
|
||||
|
@ -623,7 +623,7 @@ channel."
|
|||
(let ((key (org-element-property :key keyword))
|
||||
(value (org-element-property :value keyword)))
|
||||
;; Handle specifically KOMA-LETTER keywords. Otherwise, fallback
|
||||
;; to `latex' back-end.
|
||||
;; to `latex' backend.
|
||||
(if (equal key "KOMA-LETTER") value
|
||||
(org-export-with-backend 'latex keyword contents info))))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-latex.el --- LaTeX Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-latex.el --- LaTeX Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2011-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
(defvar engrave-faces-latex-mathescape)
|
||||
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
|
||||
(org-export-define-backend 'latex
|
||||
'((bold . org-latex-bold)
|
||||
|
@ -2274,9 +2274,9 @@ holding contextual information."
|
|||
((= (length sec) 4)
|
||||
(if numberedp (concat (car sec) "\n%s" (nth 1 sec))
|
||||
(concat (nth 2 sec) "\n%s" (nth 3 sec)))))))
|
||||
;; Create a temporary export back-end that hard-codes
|
||||
;; Create a temporary export backend that hard-codes
|
||||
;; "\underline" within "\section" and alike.
|
||||
(section-back-end
|
||||
(section-backend
|
||||
(org-export-create-backend
|
||||
:parent 'latex
|
||||
:transcoders
|
||||
|
@ -2289,7 +2289,7 @@ holding contextual information."
|
|||
(verbatim . (lambda (o _ _) (org-latex--protect-texttt (org-element-property :value o)))))))
|
||||
(text
|
||||
(org-export-data-with-backend
|
||||
(org-element-property :title headline) section-back-end info))
|
||||
(org-element-property :title headline) section-backend info))
|
||||
(todo
|
||||
(and (plist-get info :with-todo-keywords)
|
||||
(let ((todo (org-element-property :todo-keyword headline)))
|
||||
|
@ -2341,7 +2341,7 @@ holding contextual information."
|
|||
todo todo-type priority
|
||||
(org-export-data-with-backend
|
||||
(org-export-get-alt-title headline info)
|
||||
section-back-end info)
|
||||
section-backend info)
|
||||
(and (eq (plist-get info :with-tags) t) tags)
|
||||
info))
|
||||
;; Maybe end local TOC (see `org-latex-keyword').
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-man.el --- Man Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-man.el --- Man Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2011-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This library implements a Man back-end for Org generic exporter.
|
||||
;; This library implements a Man backend for Org generic exporter.
|
||||
;;
|
||||
;; To test it, run
|
||||
;;
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
|
||||
(org-export-define-backend 'man
|
||||
'((babel-call . org-man-babel-call)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-md.el --- Markdown Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-md.el --- Markdown Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
|||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements a Markdown back-end (vanilla flavor) for
|
||||
;; Org exporter, based on `html' back-end. See Org manual for more
|
||||
;; This library implements a Markdown backend (vanilla flavor) for
|
||||
;; Org exporter, based on `html' backend. See Org manual for more
|
||||
;; information.
|
||||
|
||||
;;; Code:
|
||||
|
@ -40,7 +40,7 @@
|
|||
;;; User-Configurable Variables
|
||||
|
||||
(defgroup org-export-md nil
|
||||
"Options specific to Markdown export back-end."
|
||||
"Options specific to Markdown export backend."
|
||||
:tag "Org Markdown"
|
||||
:group 'org-export
|
||||
:version "24.4"
|
||||
|
@ -92,7 +92,7 @@ headings for its own use."
|
|||
|
||||
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
|
||||
(org-export-define-derived-backend 'md 'html
|
||||
:filters-alist '((:filter-parse-tree . org-md-separate-elements))
|
||||
|
@ -150,7 +150,7 @@ headings for its own use."
|
|||
"Fix blank lines between elements.
|
||||
|
||||
TREE is the parse tree being exported. BACKEND is the export
|
||||
back-end used. INFO is a plist used as a communication channel.
|
||||
backend used. INFO is a plist used as a communication channel.
|
||||
|
||||
Enforce a blank line between elements. There are two exceptions
|
||||
to this rule:
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
(declare-function org-back-to-heading "org" (&optional invisible-ok))
|
||||
(declare-function org-next-visible-heading "org" (arg))
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
|
||||
(org-export-define-backend 'odt
|
||||
'((bold . org-odt-bold)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-org.el --- Org Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-org.el --- Org Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2013-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
;;
|
||||
;; ox-publish.el can do the following:
|
||||
;;
|
||||
;; + Publish all one's Org files to a given export back-end
|
||||
;; + Publish all one's Org files to a given export backend
|
||||
;; + Upload HTML, images, attachments and other files to a web server
|
||||
;; + Exclude selected private pages from publishing
|
||||
;; + Publish a clickable sitemap of pages
|
||||
|
@ -129,14 +129,14 @@ considered relative to the base directory.
|
|||
When both `:include' and `:exclude' properties are given values,
|
||||
the exclusion step happens first.
|
||||
|
||||
One special property controls which back-end function to use for
|
||||
One special property controls which backend function to use for
|
||||
publishing files in the project. This can be used to extend the
|
||||
set of file types publishable by `org-publish', as well as the
|
||||
set of output formats.
|
||||
|
||||
`:publishing-function'
|
||||
|
||||
Function to publish file. Each back-end may define its
|
||||
Function to publish file. Each backend may define its
|
||||
own (i.e. `org-latex-publish-to-pdf',
|
||||
`org-html-publish-to-html'). May be a list of functions, in
|
||||
which case each function in the list is invoked in turn.
|
||||
|
@ -162,8 +162,8 @@ date.
|
|||
|
||||
Some properties control details of the Org publishing process,
|
||||
and are equivalent to the corresponding user variables listed in
|
||||
the right column. Back-end specific properties may also be
|
||||
included. See the back-end documentation for more information.
|
||||
the right column. Backend specific properties may also be
|
||||
included. See the backend documentation for more information.
|
||||
|
||||
:author `user-full-name'
|
||||
:creator `org-export-creator-string'
|
||||
|
@ -547,12 +547,12 @@ publishing FILENAME."
|
|||
|
||||
|
||||
|
||||
;;; Tools for publishing functions in back-ends
|
||||
;;; Tools for publishing functions in backends
|
||||
|
||||
(defun org-publish-org-to (backend filename extension plist &optional pub-dir)
|
||||
"Publish an Org file to a specified back-end.
|
||||
"Publish an Org file to a specified backend.
|
||||
|
||||
BACKEND is a symbol representing the back-end used for
|
||||
BACKEND is a symbol representing the backend used for
|
||||
transcoding. FILENAME is the filename of the Org file to be
|
||||
published. EXTENSION is the extension used for the output
|
||||
string, with the leading dot. PLIST is the property list for the
|
||||
|
@ -841,9 +841,9 @@ Default for SITEMAP-FILENAME is `sitemap.org'."
|
|||
"Find the PROPERTY of FILE in project.
|
||||
|
||||
PROPERTY is a keyword referring to an export option, as defined
|
||||
in `org-export-options-alist' or in export back-ends. In the
|
||||
in `org-export-options-alist' or in export backends. In the
|
||||
latter case, optional argument BACKEND has to be set to the
|
||||
back-end where the option is defined, e.g.,
|
||||
backend where the option is defined, e.g.,
|
||||
|
||||
(org-publish-find-property file :subtitle \\='latex)
|
||||
|
||||
|
@ -1024,7 +1024,7 @@ the project."
|
|||
"Update index for a file in cache.
|
||||
|
||||
OUTPUT is the output from transcoding current file. BACKEND is
|
||||
the back-end that was used for transcoding. INFO is a plist
|
||||
the backend that was used for transcoding. INFO is a plist
|
||||
containing publishing and export options.
|
||||
|
||||
The index relative to current file is stored as an alist. An
|
||||
|
@ -1138,7 +1138,7 @@ publishing directory."
|
|||
"Store cross-references for current published file.
|
||||
|
||||
OUTPUT is the produced output, as a string. BACKEND is the export
|
||||
back-end used, as a symbol. INFO is the final export state, as
|
||||
backend used, as a symbol. INFO is the final export state, as
|
||||
a plist.
|
||||
|
||||
This function is meant to be used as a final output filter. See
|
||||
|
@ -1170,7 +1170,7 @@ option, e.g.,
|
|||
When PREFER-CUSTOM is non-nil, and SEARCH targets a headline in
|
||||
FILE, return its custom ID, if any.
|
||||
|
||||
It only makes sense to use this if export back-end builds
|
||||
It only makes sense to use this if export backend builds
|
||||
references with `org-export-get-reference'."
|
||||
(cond
|
||||
((and prefer-custom
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ox-texinfo.el --- Texinfo Back-End for Org Export Engine -*- lexical-binding: t; -*-
|
||||
;;; ox-texinfo.el --- Texinfo Backend for Org Export Engine -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2023 Free Software Foundation, Inc.
|
||||
;; Author: Jonathan Leech-Pepin <jonathan.leechpepin at gmail dot com>
|
||||
|
@ -38,7 +38,7 @@
|
|||
(defvar org-texinfo-supports-math--cache)
|
||||
|
||||
|
||||
;;; Define Back-End
|
||||
;;; Define Backend
|
||||
|
||||
(org-export-define-backend 'texinfo
|
||||
'((bold . org-texinfo-bold)
|
||||
|
@ -486,7 +486,7 @@ If two strings share the same prefix (e.g. \"ISO-8859-1\" and
|
|||
(defun org-texinfo--normalize-headlines (tree _backend info)
|
||||
"Normalize headlines in TREE.
|
||||
|
||||
BACK-END is the symbol specifying back-end used for export.
|
||||
BACKEND is the symbol specifying backend used for export.
|
||||
INFO is a plist used as a communication channel.
|
||||
|
||||
Make sure every headline in TREE contains a section, since those
|
||||
|
|
402
lisp/ox.el
402
lisp/ox.el
File diff suppressed because it is too large
Load Diff
|
@ -1041,8 +1041,8 @@ Some other text
|
|||
"Test `export-snippet' parser."
|
||||
(should
|
||||
(equal
|
||||
'("back-end" . "contents")
|
||||
(org-test-with-temp-text "@@back-end:contents@@"
|
||||
'("backend" . "contents")
|
||||
(org-test-with-temp-text "@@backend:contents@@"
|
||||
(org-element-map
|
||||
(org-element-parse-buffer) 'export-snippet
|
||||
(lambda (snippet) (cons (org-element-property :back-end snippet)
|
||||
|
@ -3378,8 +3378,8 @@ DEADLINE: <2012-03-29 thu.> SCHEDULED: <2012-03-29 thu.> CLOSED: [2012-03-29 thu
|
|||
|
||||
(ert-deftest test-org-element/export-snippet-interpreter ()
|
||||
"Test export snippet interpreter."
|
||||
(should (equal (org-test-parse-and-interpret "@@back-end:contents@@")
|
||||
"@@back-end:contents@@\n")))
|
||||
(should (equal (org-test-parse-and-interpret "@@backend:contents@@")
|
||||
"@@backend:contents@@\n")))
|
||||
|
||||
(ert-deftest test-org-element/footnote-reference-interpreter ()
|
||||
"Test footnote reference interpreter."
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
(require 'org-inlinetask)
|
||||
|
||||
(defun org-test-default-backend ()
|
||||
"Return a default export back-end.
|
||||
This back-end simply returns parsed data as Org syntax."
|
||||
"Return a default export backend.
|
||||
This backend simply returns parsed data as Org syntax."
|
||||
(org-export-create-backend
|
||||
:transcoders
|
||||
(mapcar (lambda (type)
|
||||
|
@ -181,7 +181,7 @@ num:2 <:active")))
|
|||
(eq (plist-get options :section-numbers) 2)
|
||||
(eq (plist-get options :with-timestamps) 'active)
|
||||
(equal (plist-get options :with-drawers) '("TEST")))))
|
||||
;; Test back-end specific values.
|
||||
;; Test backend specific values.
|
||||
(should
|
||||
(equal
|
||||
(org-export--parse-option-keyword
|
||||
|
@ -214,18 +214,18 @@ num:2 <:active")))
|
|||
;; Test `space' behaviour.
|
||||
(should
|
||||
(equal
|
||||
(let ((back-end (org-export-create-backend
|
||||
(let ((backend (org-export-create-backend
|
||||
:options '((:keyword "KEYWORD" nil nil space)))))
|
||||
(org-test-with-temp-text "#+KEYWORD: With\n#+KEYWORD: spaces"
|
||||
(org-export--get-inbuffer-options back-end)))
|
||||
(org-export--get-inbuffer-options backend)))
|
||||
'(:keyword "With spaces")))
|
||||
;; Test `newline' behaviour.
|
||||
(should
|
||||
(equal
|
||||
(let ((back-end (org-export-create-backend
|
||||
(let ((backend (org-export-create-backend
|
||||
:options '((:keyword "KEYWORD" nil nil newline)))))
|
||||
(org-test-with-temp-text "#+KEYWORD: With\n#+KEYWORD: two lines"
|
||||
(org-export--get-inbuffer-options back-end)))
|
||||
(org-export--get-inbuffer-options backend)))
|
||||
'(:keyword "With\ntwo lines")))
|
||||
;; Test `split' behaviour.
|
||||
(should
|
||||
|
@ -1853,10 +1853,10 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
|
||||
|
||||
|
||||
;;; Back-End Tools
|
||||
;;; Backend Tools
|
||||
|
||||
(ert-deftest test-org-export/define-backend ()
|
||||
"Test back-end definition and accessors."
|
||||
"Test backend definition and accessors."
|
||||
;; Translate table.
|
||||
(should
|
||||
(equal '((headline . my-headline-test))
|
||||
|
@ -1890,7 +1890,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
|
||||
(ert-deftest test-org-export/define-derived-backend ()
|
||||
"Test `org-export-define-derived-backend' specifications."
|
||||
;; Error when parent back-end is not defined.
|
||||
;; Error when parent backend is not defined.
|
||||
(should-error
|
||||
(let (org-export-registered-backends)
|
||||
(org-export-define-derived-backend 'test 'parent)))
|
||||
|
@ -1956,7 +1956,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
|
||||
(ert-deftest test-org-export/get-all-transcoders ()
|
||||
"Test `org-export-get-all-transcoders' specifications."
|
||||
;; Return nil when back-end cannot be found.
|
||||
;; Return nil when backend cannot be found.
|
||||
(should-not (org-export-get-all-transcoders nil))
|
||||
;; Same as `org-export-transcoders' if no parent.
|
||||
(should
|
||||
|
@ -1981,7 +1981,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
(org-export-get-all-transcoders
|
||||
(org-export-create-backend
|
||||
:parent 'b2 :transcoders '((paragraph . ignore)))))))
|
||||
;; Back-end transcoders overrule inherited ones.
|
||||
;; Backend transcoders overrule inherited ones.
|
||||
(should
|
||||
(eq 'b
|
||||
(let (org-export-registered-backends)
|
||||
|
@ -1993,7 +1993,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
|
||||
(ert-deftest test-org-export/get-all-options ()
|
||||
"Test `org-export-get-all-options' specifications."
|
||||
;; Return nil when back-end cannot be found.
|
||||
;; Return nil when backend cannot be found.
|
||||
(should-not (org-export-get-all-options nil))
|
||||
;; Same as `org-export-options' if no parent.
|
||||
(should
|
||||
|
@ -2018,7 +2018,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
(org-export-get-all-options
|
||||
(org-export-create-backend
|
||||
:parent 'b2 :options '((:key3 value3)))))))
|
||||
;; Back-end options overrule inherited ones.
|
||||
;; Backend options overrule inherited ones.
|
||||
(should
|
||||
(eq 'b
|
||||
(let (org-export-registered-backends)
|
||||
|
@ -2030,7 +2030,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
|
||||
(ert-deftest test-org-export/get-all-filters ()
|
||||
"Test `org-export-get-all-filters' specifications."
|
||||
;; Return nil when back-end cannot be found.
|
||||
;; Return nil when backend cannot be found.
|
||||
(should-not (org-export-get-all-filters nil))
|
||||
;; Same as `org-export-filters' if no parent.
|
||||
(should
|
||||
|
@ -2059,7 +2059,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
(org-export-get-all-filters
|
||||
(org-export-create-backend
|
||||
:parent 'b2 :filters '((:filter-paragraph . ignore)))))))
|
||||
;; Back-end filters overrule inherited ones.
|
||||
;; Backend filters overrule inherited ones.
|
||||
(should
|
||||
(eq 'b
|
||||
(let (org-export-registered-backends)
|
||||
|
@ -2071,9 +2071,9 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
|
||||
(ert-deftest test-org-export/with-backend ()
|
||||
"Test `org-export-with-backend' definition."
|
||||
;; Error when calling an undefined back-end
|
||||
;; Error when calling an undefined backend
|
||||
(should-error (org-export-with-backend nil "Test"))
|
||||
;; Error when called back-end doesn't have an appropriate
|
||||
;; Error when called backend doesn't have an appropriate
|
||||
;; transcoder.
|
||||
(should-error
|
||||
(org-export-with-backend
|
||||
|
@ -2095,11 +2095,11 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
(org-export-create-backend
|
||||
:transcoders '((plain-text . (lambda (text info) "Success"))))
|
||||
"Test")))
|
||||
;; Provide correct back-end if transcoder needs to use recursive
|
||||
;; Provide correct backend if transcoder needs to use recursive
|
||||
;; calls.
|
||||
(should
|
||||
(equal "Success\n"
|
||||
(let ((test-back-end
|
||||
(let ((test-backend
|
||||
(org-export-create-backend
|
||||
:transcoders
|
||||
(list (cons 'headline
|
||||
|
@ -2115,13 +2115,13 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote]
|
|||
(list (cons 'headline
|
||||
(lambda (headline contents info)
|
||||
(org-export-with-backend
|
||||
test-back-end headline contents info))))))))))
|
||||
test-backend headline contents info))))))))))
|
||||
|
||||
(ert-deftest test-org-export/data-with-backend ()
|
||||
"Test `org-export-data-with-backend' specifications."
|
||||
;; Error when calling an undefined back-end.
|
||||
;; Error when calling an undefined backend.
|
||||
(should-error (org-export-data-with-backend nil "nil" nil))
|
||||
;; Otherwise, export data recursively, using correct back-end.
|
||||
;; Otherwise, export data recursively, using correct backend.
|
||||
(should
|
||||
(equal
|
||||
"Success!"
|
||||
|
@ -3107,7 +3107,7 @@ Para2"
|
|||
(link . (lambda (l c i)
|
||||
(or (org-export-custom-protocol-maybe l c 'no-test i)
|
||||
"failure")))))))))
|
||||
;; Ignore anonymous back-ends.
|
||||
;; Ignore anonymous backends.
|
||||
(should-not
|
||||
(string-match
|
||||
"success"
|
||||
|
@ -3835,7 +3835,7 @@ Another text. (ref:text)
|
|||
(let ((headline (org-element-map tree 'headline #'identity nil t)))
|
||||
(equal (org-export-get-reference headline info)
|
||||
(org-export-get-reference headline info)))))
|
||||
;; References get through local export back-ends.
|
||||
;; References get through local export backends.
|
||||
(should
|
||||
(org-test-with-parsed-data "* Headline"
|
||||
(let ((headline (org-element-map tree 'headline #'identity nil t))
|
||||
|
|
Loading…
Reference in New Issue