Commit Graph

28 Commits

Author SHA1 Message Date
Nicolas Goaziou 0b89d5bcc6 org-export: Silence byte-compiler 2012-07-02 11:22:22 +02:00
Nicolas Goaziou 62453c5bf4 Export backends: Interpret correctly DATE keyword
* contrib/lisp/org-e-ascii.el (org-e-ascii-template--document-title):
  Interpret correctly DATE keyword.
* contrib/lisp/org-e-html.el (org-e-html-format-date): Interpret
  correctly DATE keyword.
* contrib/lisp/org-e-latex.el (org-e-latex-template): Interpret
  correctly DATE keyword.
* contrib/lisp/org-e-odt.el (org-e-odt-format-preamble,
  org-e-odt-update-meta-file): Interpret correctly DATE keyword.
2012-06-20 12:33:23 +02:00
Nicolas Goaziou 168c83e6d4 org-export: Correctly export check-boxes in description lists
* contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width): Pay
  attention to length of check-box, if any when computing text width.
(org-e-ascii--checkbox): New function.
(org-e-ascii-item): Allow check-boxes in description lists.
(org-e-ascii-paragraph): Refactor code.
* contrib/lisp/org-e-html.el (org-e-html-format-list-item): Allow
  check-boxes in description lists.
* contrib/lisp/org-e-latex.el (org-e-latex-item): Allow check-boxes in
  description lists.
* contrib/lisp/org-e-odt.el (org-e-odt--checkbox): New function.
(org-e-odt-item): Allow check-boxes in description lists.
(org-e-odt-paragraph): Do not add checkbox in front of paragraph if it
belongs to a description item, since the box will be attached to the
tag.
2012-06-09 15:34:27 +02:00
Nicolas Goaziou 4728a4611e 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-09 00:17:30 +02:00
Nicolas Goaziou 09164e5c72 org-export: Hide select tags
* contrib/lisp/org-export.el (org-export-get-tags): New function.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title): Use new function.
* contrib/lisp/org-e-html.el (org-e-html-format-headline--wrap,
  org-e-html-headline): Use new function.
* contrib/lisp/org-e-latex.el (org-e-latex-headline,
  org-e-latex-inlinetask): Use new function.
* contrib/lisp/org-e-odt.el (org-e-odt-format-headline--wrap): Use new
  function.
* testing/lisp/test-org-export.el: Add tests.
2012-05-26 13:52:03 +02:00
Nicolas Goaziou 5d1c7e741b Update some docstrings and comments
* contrib/lisp/org-e-ascii.el (org-e-ascii-table,
  org-e-ascii--table-cell-width): Update docsring.
* contrib/lisp/org-e-html.el (org-e-html-table): Update docstring.
* contrib/lisp/org-e-latex.el (org-e-latex-table): Update docstring.
* contrib/lisp/org-e-odt.el (org-e-odt-table): Update docstring.
2012-05-23 23:21:25 +02:00
Nicolas Goaziou 4721052ec6 org-e-ascii: Small refactoring
* contrib/lisp/org-e-ascii.el (org-e-ascii--unique-links): Small refactoring.
2012-05-21 21:54:09 +02:00
Nicolas Goaziou dc976e1139 org-export: Only number elements with a caption
* contrib/lisp/org-export.el (org-export-collect-elements): Collect
  elements with a caption only.
(org-export-collect-tables, org-export-collect-figures,
org-export-collect-listings): Update docstring.
* contrib/lisp/org-e-ascii.el (org-e-ascii--has-caption-p): Renamed
  from `org-e-ascii--has-caption-or-name-p'.
(org-e-ascii-link): Use previous function.
(org-e-ascii--build-caption, org-e-ascii--list-listings,
org-e-ascii--list-tables): Do not use #+NAME keyword as a fallback caption.
2012-05-21 21:38:42 +02:00
Nicolas Goaziou 65c0e18892 org-e-ascii: Ensure consistent cross-referencing between elements and links
* contrib/lisp/org-e-ascii.el (org-e-ascii--has-caption-or-name-p):
  New function.
(org-e-ascii--build-caption, org-e-ascii-link): Use new function.

This patch ensures only elements with a name or a caption are counted
in when a fuzzy link pointing to an element is resolved.
2012-05-20 13:57:58 +02:00
Nicolas Goaziou c84cda961f Fix some more comments in export back-ends 2012-05-18 21:06:12 +02:00
Nicolas Goaziou 51472b4d33 org-export: Implement `org-export-resolve-radio-link'
* contrib/lisp/org-export.el (org-export-resolve-coderef): New function.
* contrib/lisp/org-e-ascii.el (org-e-ascii-link): Use new function.
* contrib/lisp/org-e-html.el (org-e-html-link): Use new function.
* contrib/lisp/org-e-latex.el (org-e-latex-link): Use new function.
* contrib/lisp/org-e-odt.el (org-e-odt-link): Use new function.
* testing/lisp/test-org-export.el: Add tests.
2012-05-18 11:42:16 +02:00
Nicolas Goaziou e1eb6a4af2 org-export: Rename `org-export-option-alist' into `org-export-options-alist'
* contrib/lisp/org-e-ascii.el (org-e-ascii-options-alist): Renamed
  from `org-e-ascii-option-alist'.
* contrib/lisp/org-e-html.el (org-e-html-options-alist): Renamed from
  `org-e-html-option-alist'.
* contrib/lisp/org-e-latex.el (org-e-latex-options-alist): Renamed
  from `org-e-latex-option-alist'.
* contrib/lisp/org-e-odt.el (org-e-odt-options-alist): Renamed from
  `org-e-odt-option-alist'.
* contrib/lisp/org-export.el (org-export-define-derived-backend,
  org-export-parse-option-keyword, org-export-get-inbuffer-options,
  org-export-get-global-options): Rename `org-export-option-alist'
  into `org-export-options-alist'.
2012-05-18 11:42:16 +02:00
Nicolas Goaziou 7421e96536 org-export: Remove naming convening for back-ends
* contrib/lisp/org-e-ascii.el (org-e-ascii-translate-alist): New variable.
* contrib/lisp/org-e-html.el (org-e-html-translate-alist): New
  variable.
(org-e-html-filters-alist): Move variable into an appropriate section.
* contrib/lisp/org-e-latex.el (org-e-latex-translate-alist): New variable.
* contrib/lisp/org-e-odt.el (org-e-odt-translate-alist): New variable.
(org-e-odt-option-alist): Move variable into an appropriate section.
* contrib/lisp/org-export.el (org-export-transcoder): Retrieve
  translators from `org-BACKEND-translate-alist' instead of applying
  a naming convention to each of them.
* testing/lisp/test-org-export.el: Update tests.
2012-05-18 11:42:15 +02:00
Nicolas Goaziou 1c2aaca837 org-e-ascii: Table cells are exported with proper export options
* contrib/lisp/org-e-ascii.el (org-e-ascii-superscript): Table cells
  are exported with proper export options.
2012-05-18 11:42:15 +02:00
Nicolas Goaziou 212819c5d0 org-export: Properly handle export-block elements
* contrib/lisp/org-e-ascii.el (org-e-ascii-export-block): type
  attribute is always uppercase.
* contrib/lisp/org-e-html.el (org-e-html-export-block): type attribute
  is always uppercase.
* contrib/lisp/org-e-latex.el (org-e-latex-export-block): type
  attribute is always uppercase.
* contrib/lisp/org-e-odt.el (org-e-odt-export-block): type attribute
  is always uppercase.
2012-05-05 22:47:00 +02:00
Nicolas Goaziou 72ca00ca09 org-e-ascii: Fix table export bug when ignoring sub/superscript
* contrib/lisp/org-e-ascii.el (org-e-ascii--table-cell-width):
  Refactor code.
* contrib/lisp/org-export.el: Do not normalize contents when expanding
  them, since it will be done at the end of the function, and only for
  elements.
2012-05-04 14:02:41 +02:00
Nicolas Goaziou f4791557e2 org-element: Store fixed-with and comment contents without markers
* contrib/lisp/org-element.el (org-element-comment-parser): Store
  comments without leading hash and maybe plus sign.
(org-element-fixed-width-parser): Store fixed-width contents without
leading colons.
(org-element-comment-interpreter,
org-element-fixed-width-interpreter): Apply changes.
* contrib/lisp/org-e-odt.el (org-e-odt-fixed-width): Apply changes to
  fixed-width `:value' property.
* contrib/lisp/org-e-latex.el (org-e-latex-fixed-width): Apply changes
  to fixed-width `:value' property.
* contrib/lisp/org-e-html.el (org-e-html-fixed-width): Apply changes
  to fixed-width `:value' property.
* contrib/lisp/org-e-ascii.el (org-e-ascii-fixed-width): Apply changes
  to fixed-width `:value' property.
* testing/lisp/test-org-element.el: Add tests.
2012-05-02 17:25:30 +02:00
Nicolas Goaziou 32a5920e69 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 14:29:40 +02:00
Nicolas Goaziou 03813d9bc4 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 20:10:54 +02:00
Nicolas Goaziou b5f4b526ca org-element: Rename `time-stamp' object type into `timestamp' 2012-04-29 02:26:57 +02:00
Nicolas Goaziou 941f90a649 org-export: Export `clock' and `planning' elements
* contrib/lisp/org-export.el (org-export-option-alist): Add new
  filters.
(org-export-with-clocks, org-export-with-planning,
org-export-filter-clock-functions,
org-export-filter-planning-functions): New variables.
(org-export--skip-p): Skip `clock' and `planning' types depending on
export options.
* contrib/lisp/org-e-ascii.el (org-e-ascii-clock,
  org-e-ascii-planning): New functions.
(org-e-ascii-time-stamp): Update function.  Use `org-translate-time'.
* contrib/lisp/org-e-html.el (org-e-html-clock, org-e-html-planning):
  New functions.
(org-e-html-time-stamp): Update function.
* contrib/lisp/org-e-latex.el (org-e-latex-clock,
  org-e-latex-planning): New functions.
(org-e-latex-time-stamp): Update function.  Use `org-translate-time'.
* contrib/lisp/org-e-odt.el (org-e-odt-clock, org-e-odt-planning): New
  functions.
(org-e-odt-time-stamp): Update function.  Use `org-translate-time'.
* testing/lisp/test-org-export.el: Add tests.
2012-04-29 02:26:33 +02:00
Nicolas Goaziou b21b6ead24 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 18:00:50 +02:00
Nicolas Goaziou 312e225685 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 11:41:15 +02:00
Nicolas Goaziou c6dc6e3d32 org-element: Verse blocks now contain objects
* contrib/lisp/org-element.el (org-element-verse-block-parser): Verse
  blocks now contain objects.
(org-element-verse-block-interpreter, org-element-current-element):
Apply changes to verse blocks.
(org-element-secondary-value-alist): Remove verse blocks from elements
with a secondary string.
* contrib/lisp/org-e-odt.el (org-e-odt-verse-block): Apply changes to
  verse blocks.
* contrib/lisp/org-e-latex.el (org-e-latex-verse-block): Apply changes
  to verse blocks.
* contrib/lisp/org-e-html.el (org-e-html-verse-block): Apply changes
  to verse blocks.
* contrib/lisp/org-e-ascii.el (org-e-ascii-verse-block): Apply changes
  to verse blocks.
* testing/lisp/test-org-element.el: Add tests.
2012-04-26 14:49:29 +02:00
Nicolas Goaziou 052247ce81 org-e-ascii: Correctly indent table.el tables
* contrib/lisp/org-e-ascii.el (org-e-ascii-table): Remove indentation
  from table.el tables.
2012-04-22 17:00:32 +02:00
Jambunathan K d73db66a38 Move org-e-* from EXPERIMENTAL/ to contrib/lisp/ 2012-04-22 19:47:37 +05:30
Jambunathan K aa2e5308ee Move contrib/lisp/org-e-*.el to EXPERIMENTAL/ 2012-04-22 19:41:10 +05:30
Bastien Guerry bafd9a42f8 Move EXPERIMENTAL/* into contrib/lisp/ and change org-export.el accordingly. 2012-04-21 16:22:31 +02:00
Renamed from EXPERIMENTAL/org-e-ascii.el (Browse further)