Commit Graph

263 Commits

Author SHA1 Message Date
Nicolas Goaziou 3f40057adc org-export: Limit depth of headline collection to headline level
* contrib/lisp/org-export.el (org-export-collect-headlines): By
  default, limit depth of headline collection to last headline level.
* contrib/lisp/org-e-html.el (org-e-html-toc): Small refactoring.
2012-08-24 09:36:18 +02:00
Nicolas Goaziou f9e5600f82 org-export: Fix reference to a free variable in macros
* contrib/lisp/org-export.el (org-export-define-backend,
  org-export-define-derived-backend): Fix reference to a free variable
  in macro.
2012-08-23 11:03:09 +02:00
Nicolas Goaziou fc6b9f1d88 org-export: Fix code comments 2012-08-20 10:25:05 +02:00
Nicolas Goaziou 952d722dcd org-export: Allow to toggle inlinetasks inclusion in export output
* contrib/lisp/org-export.el (org-export-options-alist,
  org-export--skip-p): Allow to toggle inlinetask inclusion in export.
(org-export-headline-levels, org-export-with-priority): Fix docstring.
(org-export-with-inlinetasks): New variable.
* testing/lisp/test-org-export.el: Add tests.
2012-08-16 12:46:49 +02:00
Achim Gratz a089a3bccc add autload cookie for org-export-dispatch
* contrib/lisp/org-export.el: Add autload cookie for org-export-dispatch.
2012-08-09 18:25:45 +02:00
Nicolas Goaziou 5057ae0fc2 org-export: Require info argument in some topology functions
* contrib/lisp/org-export.el (org-export-first-sibling-p,
  org-export-last-sibling-p, org-export-get-previous-element,
  org-export-get-next-element): Add INFO argument.  This is necessary
  to ignore non-exportable elements or objects.
(org-export--skip-p): Apply signature change.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-e-odt.el (org-e-odt-footnote-reference): Apply
  signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference,
  org-e-latex-headline, org-e-latex-table-cell): Apply signature
  change.
* contrib/lisp/org-e-html.el (org-e-html-footnote-reference,
  org-e-html-headline): Apply signature change.
* contrib/lisp/org-e-beamer.el (org-e-beamer-export-snippet,
  org-e-beamer--format-block): Apply signature change.
2012-07-27 16:16:04 +02:00
Nicolas Goaziou c8acf8d695 org-export and back-ends: Fix some docstrings 2012-07-26 15:33:27 +02:00
Nicolas Goaziou 8d98835a3c org-export: Export properties from subtrees are case insensitive
* contrib/lisp/org-export.el (org-export--get-subtree-options): Export
  properties from subtrees are case insensitive.
2012-07-25 10:13:09 +02:00
Nicolas Goaziou 2b6ba84ad6 org-export: Memoize results from `org-export-data'
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
  Initialize hash table for memoization.
(org-export-data): Memoize results.
2012-07-24 22:52:29 +02:00
Nicolas Goaziou dbea7e658f org-export: Rename some internal functions
* contrib/lisp/org-export.el (org-export-get-environment,
  org-export-collect-tree-properties, org-export-data,
  org-export-expand-include-keyword): Use new names.
(org-export--parse-option-keyword): Renamed from
`org-export-parse-option-keyword'.
(org-export--get-subtree-options): Renamed from
`org-export-get-subtree-options'.
(org-export--get-inbuffer-options): Renamed from
`org-export-get-inbuffer-options'.
(org-export--get-buffer-attributes): Renamed from
`org-export-get-buffer-attributes'.
(org-export--get-global-options): Renamed from
`org-export-get-global-options'.
(org-export--allow-BIND-local): Renamed from
`org-export-allow-BIND-local'.
(org-export--confirm-letbind): Renamed from
`org-export-confirm-letbind'.
(org-export--install-letbind-maybe): Renamed from
`org-export-install-letbind-maybe'.
(org-export--get-min-level): Renamed from `org-export-get-min-level'.
(org-export--collect-headline-numbering): Renamed from
`org-export-collect-headline-numbering'.
(org-export--populate-ignore-list): Renamed from
`org-export-populate-ignore-list'.
(org-export--interpret-p): Renamed from `org-export--interpret-p'.
(org-export--prepare-file-contents): Renamed from
`org-export-prepare-file-contents'.
* contrib/lisp/org-e-publish.el (org-e-publish-find-date): Use new
  names.
* testing/lisp/test-org-export.el: Update tests.
2012-07-24 22:52:29 +02:00
Nicolas Goaziou b0f2e083b7 org-export: Update docstrings 2012-07-23 19:32:57 +02:00
Nicolas Goaziou 2b21bb4e52 export back-ends: Remove unused translators functions 2012-07-23 17:53:55 +02:00
Nicolas Goaziou a13a51e812 org-export: Add :export-block keyword to `org-export-define-derived-backend'
* contrib/lisp/org-export.el (org-export-define-derived-backend):
  Add :export-block keyword.  Also fix a generated doc-string.
* contrib/lisp/org-e-beamer.el: Use new keyword.
2012-07-23 14:19:51 +02:00
Nicolas Goaziou 6ea9d8c827 org-export: `org-export-define-backend': the standard way to create a back-end
* contrib/lisp/org-export.el (org-export-define-backend): New macro.
* contrib/lisp/org-e-ascii.el: Use new macro.
* contrib/lisp/org-e-html.el: Use new macro.
* contrib/lisp/org-e-latex.el: Use new macro.
* contrib/lisp/org-e-odt.el: Use new macro.
* contrib/lisp/org-element.el (org-element-block-name-alist): Remove
  hard-coded export block names from variable, since they are added
  automatically by `org-export-define-backend'.
* testing/lisp/test-org-element.el: Update test.
2012-07-23 14:12:14 +02:00
Nicolas Goaziou 611075db0b org-e-html: Remove an useless argument
* contrib/lisp/org-e-html.el (org-e-html-export-as-html): Remove
  PUB-DIR, which doesn't make sense in that function.
* contrib/lisp/org-export.el: Apply change in function declaration.
2012-07-23 09:51:45 +02:00
Nicolas Goaziou 1b64d9582e org-export: Add optional argument to `org-export-read-attribute'
* contrib/lisp/org-export.el (org-export-read-attribute): Add optional
  argument to `org-export-read-attribute'.
* contrib/lisp/org-e-ascii.el (org-e-ascii-horizontal-rule): Use
  additional argument.
2012-07-21 15:12:08 +02:00
Nicolas Goaziou 86ff4cde98 org-export: Silence byte-compiler 2012-07-20 19:37:22 +02:00
Nicolas Goaziou 8478fac4a5 Add autoload and a commands to export to temporary buffer in export back-ends
* contrib/lisp/org-e-ascii.el (org-e-ascii-export-as-ascii): New
  function.
(org-e-ascii-export-to-ascii): Now autoloaded.
* contrib/lisp/org-e-latex.el (org-e-latex-export-as-latex): New
  function.
(org-e-latex-export-to-pdf): Now autoloaded.
(org-e-latex--collect-errors): Renamed from
`org-e-latex-collect-errors'.
(org-e-latex-compile): Apply renaming.
* contrib/lisp/org-e-html.el (org-e-html-export-as-html): New
  function.
(org-e-html-export-to-html): Fix docstring.
* contrib/lisp/org-export.el (org-export-dispatch): Use new functions.
2012-07-20 13:48:05 +02:00
Nicolas Goaziou 070e03011d org-element: Rename a few internal functions
* contrib/lisp/org-element.el (org-element--parse-elements): Renamed
  from `org-element-parse-elements'.
(org-element--parse-objects): Renamed from `org-element-parse-objects'.
(org-element--get-next-object-candidates): Renamed from
`org-element-get-next-object-candidates'.
(org-element--interpret-affiliated-keywords): Renamed from
`org-element-interpret--affiliated-keywords'.
(org-element--current-element): Renamed from
`org-element-current-element'.
(org-element--collect-affiliated-keywords): Renamed from
`org-element-collect-affiliated-keywords'.
(org-element-center-block-parser, org-element-drawer-parser,
org-element-dynamic-block-parser,
org-element-footnote-definition-parser, org-element-inlinetask-parser,
org-element-plain-list-parser, org-element-quote-block-parser,
org-element-special-block-parser, org-element-comment-parser,
org-element-comment-block-parser, org-element-example-block-parser,
org-element-export-block-parser, org-element-fixed-width-parser,
org-element-horizontal-rule-parser,
org-element-latex-environment-parser, org-element-paragraph-parser,
org-element-src-block-parser, org-element-table-parser,
org-element-verse-block-parser, org-element-fill-paragraph,
org-element-context, org-element-at-point, org-element-interpret-data,
org-element-parse-secondary-string, org-element-parse-buffer): Apply
name change.
* contrib/lisp/org-export.el (org-export-get-buffer-attributes): Apply
  name change.
* testing/lisp/test-org-element.el: Update tests accordingly.
* testing/lisp/test-org-export.el: Update tests accordingly.
2012-07-19 11:23:43 +02:00
Nicolas Goaziou 66767db56c org-export: Replace member with memq when possible
* contrib/lisp/org-element.el (org-element-set-element): Replace
  member with memq.
* contrib/lisp/org-export.el (org-export-get-min-level,
  org-export--skip-p, org-export-data, org-export-table-cell-width,
  org-export-table-cell-alignment): Replace member with memq.
2012-07-17 20:49:31 +02:00
Nicolas Goaziou 95cd07d058 org-export: Use `eq' instead of `equal' when possible
* contrib/lisp/org-export.el (org-export-data,
  org-export-footnote-first-reference-p,
  org-export-get-footnote-number, org-export-get-ordinal,
  org-export-get-loc, org-export-table-row-group,
  org-export-table-cell-starts-colgroup-p,
  org-export-table-cell-ends-colgroup-p,
  org-export-table-cell-address): Use `eq' instead of `equal' when
  possible.
* contrib/lisp/org-e-ascii.el (org-e-ascii-table-row):
* contrib/lisp/org-e-beamer.el (org-e-beamer-select-environment):
* contrib/lisp/org-e-html.el (org-e-html-footnote-section,
  org-e-html-latex-environment, org-e-html-paragraph): Use `eq'
  instead of `equal' when possible.
* contrib/lisp/org-e-latex.el (org-e-latex--get-footnote-counter):
* contrib/lisp/org-e-odt.el (org-e-odt-do-format-code,
  org-e-odt-footnote-def, org-e-odt-item, org-e-odt-latex-environment,
  org-e-odt-latex-fragment, org-e-odt-plain-list, org-e-odt-table,
  org-e-odt-enumerate-element): Use `eq' instead of `equal' when
  possible.

In particular, comparing elements shouldn't be done with `equal' since
they are circular lists.  On the other hand, using `eq' is fine if
they belong to the same tree.
2012-07-16 16:28:06 +02:00
Nicolas Goaziou 5a3617c6be org-export: Allow anonymous functions in translate alists
* contrib/lisp/org-export.el (org-export-transcoder, org-export-data):
  Allow anonymous functions in translate alists.
* testing/lisp/test-org-export.el: Update tests.
2012-07-15 21:29:38 +02:00
Nicolas Goaziou e6a88820bf org-export: Fix a docstring
* contrib/lisp/org-export.el (org-export-translate): Fix docstring.
2012-07-15 12:39:44 +02:00
Nicolas Goaziou 373cb5a37e org-export: Silence byte-compiler 2012-07-14 12:05:20 +02:00
Jambunathan K 22a6d99d5a org-export: Re-arrange entries in `org-export-dictionary'
* contrib/lisp/org-export.el (org-export-dictionary):
Re-arrange entries in ascending order.
2012-07-13 03:25:41 +05:30
Jambunathan K 936ff0703b org-export: Update org-export-dictionary
* contrib/lisp/org-export.el (org-export-dictionary): Add
follwing new entires - "Author", "Date", "Equation" and
"Figure".
2012-07-13 03:25:29 +05:30
Nicolas Goaziou 1216df61cc org-export: Implement multi-backend dictionary
* contrib/lisp/org-export.el (org-export-translate): New function.
(org-export-dictionary): New variable.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-toc,
  org-e-ascii--list-listings, org-e-ascii--list-tables,
  org-e-ascii-template, org-e-ascii--translate): Use new translation
  system.
(org-e-ascii-dictionary): Remove variable.
2012-07-12 13:31:06 +02:00
Nicolas Goaziou d5f5c77fcd org-export: Small refactoring
* contrib/lisp/org-export.el (org-export-get-previous-element,
  org-export-get-next-element): Small refactoring.
* testing/lisp/test-org-export.el: Add tests.
2012-07-10 19:22:04 +02:00
Nicolas Goaziou bb9a26389c org-element: Rename `org-export-set-element' into `org-element-set-element'
* contrib/lisp/org-element.el (org-element-set-element): New function.
* contrib/lisp/org-export.el (org-export-set-element): Removed function.
* testing/lisp/test-org-element.el: Add test.
* testing/lisp/test-org-export.el: Remove test.
2012-07-10 17:29:13 +02:00
Nicolas Goaziou 9028c4655f org-export: Improve a docstring
* contrib/lisp/org-export.el (org-export-get-genealogy): Improve
  docstring.
2012-07-10 15:30:51 +02:00
Nicolas Goaziou 0bbc9fa075 org-export: Accept nil :post-blank property
* contrib/lisp/org-export.el (org-export-data): Nil :post-blank
  property is equivalent to a value of 0.
2012-07-09 22:48:00 +02:00
Bastien Guerry 9731a8b681 Fix `org-export-creator-string' and add the option `org-e-html-creator-string'.
* org-e-html.el (org-e-html-creator-string): New option.
(org-e-html-options-alist): Use it.

* org-export.el (org-export-creator-string): Don't use HTML
tags in the generic creator string.

Thanks to Nicolas for directions on what to change wrt this.
2012-07-06 09:09:31 +02:00
Nicolas Goaziou b5eccf94df org-export: Fix docstrings 2012-07-05 23:42:09 +02:00
Bastien Guerry ec5cc394b4 org-export.el (org-export-filters-alist): Fix typo in docstring.
* org-export.el (org-export-filters-alist): Fix typo in docstring.
2012-07-05 18:06:14 +02:00
Bastien Guerry 820803ab95 Add links to Org mode and GNU Emacs websites in creator strings.
* org-html.el (org-export-as-html): Add links to the Org mode
and GNU Emacs websites When :html-postamble is set to 't.

* org-export.el (org-export-creator-string): Add links to the
Org mode and GNU Emacs websites.
2012-07-05 16:02:06 +02:00
Nicolas Goaziou 73951db845 org-export: Add a subtree property for each export option
* contrib/lisp/org-export.el (org-export-get-subtree-options): Add
  a subtree property for each export option.
* testing/lisp/test-org-export.el: Add tests.

Properties names are obtained by adding "EXPORT_" prefix to buffer
keywords.
2012-07-05 13:44:26 +02:00
Nicolas Goaziou e2cd9c398d org-export: Modify exclude tags and select tags keywords
* contrib/lisp/org-export.el (org-export-options-alist):
  EXPORT_EXCLUDE_TAGS (resp. EXPORT_SELECT_TAGS) becomes
  EXCLUDE_TAGS (resp. SELECT_TAGS).

EXPORT_ prefix is required for subtree properties relative to export.
Thus, this change avoids confusion.
2012-07-04 18:38:48 +02:00
Nicolas Goaziou c96431a2ea org-export: Small clean-up
* contrib/lisp/org-export.el (org-export-get-subtree-options): Small
  clean-up.
2012-07-04 18:00:31 +02:00
Nicolas Goaziou a69f4b88c1 org-export: Fix byte-compilation
* contrib/lisp/org-export.el (org-export-with-current-buffer-copy):
  Fix byte-compilation.
2012-07-02 11:56:17 +02:00
Nicolas Goaziou 0b89d5bcc6 org-export: Silence byte-compiler 2012-07-02 11:22:22 +02:00
Nicolas Goaziou ab82a9dcfe Update tests and comments for new snippet syntax
* contrib/lisp/org-export.el (org-export-snippet-translation-alist):
  Fix docstring.
(org-export-as): Fix code comment.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org-export.el: Update tests.
2012-06-30 10:01:28 +02:00
Nicolas Goaziou bafe0fb295 org-export: Fix bug with default DATE value
* contrib/lisp/org-export.el (org-export-get-global-options): Parse
  default value from parsed keywords, too.
* testing/lisp/test-org-export.el: Change test accordingly.
2012-06-22 15:07:07 +02:00
Nicolas Goaziou 2900138774 org-export: Fix error when calling "l" from dispatcher
* contrib/lisp/org-export.el (org-export-dispatch): Fix error when
  calling "l" from dispatcher.
2012-06-18 11:49:12 +02:00
Nicolas Goaziou 04ad4ab417 org-export: Follow EXPORT_TITLE property when exporting subtree
* contrib/lisp/org-export.el (org-export-get-subtree-options): Make
  sure point is at an headline and buffer isn't narrowed before
  looking for EXPORT_TITLE property.
* testing/lisp/test-org-export.el: Add test.
2012-06-18 01:34:57 +02:00
Nicolas Goaziou a2fd96a3de org-export: Fix code comments 2012-06-12 17:31:48 +02:00
Nicolas Goaziou eb69035d5e org-export: Fix template for derived back-ends
* contrib/lisp/org-export.el (org-export-as): Fix template for derived
  back-ends.
2012-06-12 13:48:19 +02:00
Nicolas Goaziou 68a595ce9d org-export: Add `org-export-read-attribute' for normalized attr lines
* contrib/lisp/org-export.el (org-export-read-attribute): New function.
* testing/lisp/test-org-export.el: Add test.
2012-06-12 10:25:00 +02:00
Nicolas Goaziou f56e862b1e org-export: Change signatures of first-sibling-p and last-sibling-p
* contrib/lisp/org-export.el (org-export-first-sibling-p,
  org-export-last-sibling-p): Remove communication channel from
  signature.
* contrib/lisp/org-e-html.el (org-e-html-headline): Apply signature
  changes.
* contrib/lisp/org-e-latex.el (org-e-latex-headline): Apply signature
  changes.
* contrib/lisp/org-e-odt.el (org-e-odt-headline): Change code
  comments.
2012-06-09 11:34:16 +02:00
Nicolas Goaziou 4dee3eb952 org-export: Update code comments 2012-06-09 10:31:46 +02:00
Nicolas Goaziou e23f506d98 org-export: Add function to change elements in parse tree
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
  Ensure initial accumulator in non-nil.
(org-export-set-element): New function.
* testing/lisp/test-org-export.el: Add test.
2012-06-09 00:17:40 +02:00
Nicolas Goaziou 03739dd512 org-export: Fix code typo
* contrib/lisp/org-export.el (org-export-get-ordinal): Fix code typo.
2012-06-09 00:17:40 +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 3f0f8734ff org-export: Suppress some byte-compiling warnings 2012-06-08 16:12:47 +02:00
Nicolas Goaziou 451191bc41 org-export: Correctly resolve fuzzy links whose path starts with *
* contrib/lisp/org-export.el (org-export-resolve-fuzzy-link):
  Correctly resolve fuzzy links whose path starts with *
* testing/lisp/test-org-export.el: Add tests.
2012-06-07 00:06:19 +02:00
Nicolas Goaziou ad235400a6 org-export: Support for external id links
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
  Retrieve footnote definitions and id in buffer.
(org-export-store-footnote-definitions): Removed function.
(org-export-collect-tree-properties): Update docstring.
(org-export-as): Do not call `org-export-store-footnote-definitions'.
(org-export-resolve-id-link): Return external file name when there's
no match for id in current parse tree.
* contrib/lisp/org-e-latex.el (org-e-latex-link): Handle external id
  links.
* testing/lisp/test-org-export.el: Add tests.
2012-06-06 23:39:04 +02:00
Nicolas Goaziou 4aa8693c2c org-export: Remove paths from requires
* contrib/lisp/org-export.el: Remove paths from requires.
2012-05-28 15:49:07 +02:00
Nicolas Goaziou 4b0121fc2a org-export: Move requires into dispatcher
* contrib/lisp/org-export.el (org-export-dispatch): Move requires into
  dispatcher.

This is a temporary change, until interactive functions in back-ends
can be properly autoloaded.
2012-05-28 09:34:23 +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 68744bf19f org-export: Fix selective export when a select tag is present
* contrib/lisp/org-export.el (org-export-populate-ignore-list): Fix
  docstring.
(org-export--selected-trees): Correctly search for headlines with
a select tag.
(org-export--skip-p): Fix selective export when a select tag is
present in the buffer.
* testing/lisp/test-org-export.el: Update tests.
2012-05-26 13:51:55 +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 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 c91bcb368f org-export: Fix macro expansion when back-end protects dollar signs
* contrib/lisp/org-export.el (org-export-get-inbuffer-options): Return
  an "eval" macro as a regular secondary string instead of a plain
  string.
(org-export-expand-macro): Replace arguments before exporting
them (and possibly protecting dollar signs).  Refactor code.
* testing/lisp/test-org-export.el: Add tests.
2012-05-20 12:18:16 +02:00
Nicolas Goaziou 368a7f69c4 org-export: Move translate-alist into communication channel
* contrib/lisp/org-export.el (org-export-get-environment): Move
  translate-alist in communication channel.  Refactor code.
(org-export-transcoder): Retrieve transcoder from communication
channel instead of global variable.
2012-05-20 12:18:11 +02:00
Nicolas Goaziou 57cfa6aa9b org-export: Fix macro expansion error
* contrib/lisp/org-export.el (org-export-expand-macro): Fix code typo.
2012-05-20 09:57:33 +02:00
Nicolas Goaziou 946230bae4 A few fixes to comments and docstrings 2012-05-18 17:26:53 +02:00
Nicolas Goaziou 507b3c937b org-export: Fill `org-export-current-backend' before pre-parsing hook
* contrib/lisp/org-export.el (org-export-as): Store current back-end
  in `org-export-current-backend' before running
  `org-export-before-parsing-hook'.
2012-05-18 11:42:16 +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 69f7a9b67f org-export: Implement `org-export-define-derived-backend'
* contrib/lisp/org-export.el (org-export-define-derived-backend): New
  function.
2012-05-18 11:42:15 +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 323836f0ff org-export: Fix code comments
* contrib/lisp/org-export.el (org-export-resolve-fuzzy-link): Fix code comments.
2012-05-12 10:45:06 +02:00
Nicolas Goaziou e1d6c251ae org-export: Fix uninterpreted syntax status
* contrib/lisp/org-export.el (org-export-data): Send uninterpreted Org
  syntax into export process again, so plain text transformations
  still can be applied on it.
2012-05-07 13:32:49 +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 01d83dc1f4 org-export: Fix table export bug with cells made of only one object
* contrib/lisp/org-export.el (org-export-table-row-is-special-p,
  org-export-table-cell-width, org-export-table-cell-alignment):
  Ensure cell only contains a string before trying to match width
  cookie.
* testing/lisp/test-org-export.el: Modify tests accordingly.

Thanks to Eric Fraga for discovering and investigating about this.
2012-05-03 14:29: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 537ab2ada3 org-element: Interpret secondary strings with `org-element-interpret-data'
* contrib/lisp/org-element.el (org-element-headline-interpreter,
  org-element-inlinetask-interpreter, org-element-item-interpreter,
  org-element-footnote-reference-interpreter,
  org-element-interpret--affiliated-keywords): Use
  `org-element-interpret-data' instead of
  `org-element-interpret-secondary'.
(org-element-interpret-data): Handle secondary strings.  Refactor
code.
(org-element-interpret-secondary): Remove function
* contrib/lisp/org-export.el (org-export-table-cell-alignment): Use
  `org-element-interpret-data' instead of
  `org-element-interpret-secondary'.
2012-04-30 20:10:54 +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 bea597be96 org-export: Add `active' and `inactive' alternatives to `org-export-with-timestamps'
* contrib/lisp/org-export.el (org-export-with-timestamps): Allow to
  keep only active timestamps or inactive ones with respectively
  `active' and `inactive' values.
(org-export--skip-p): Update tests to determine if a timestamp should
be ignored.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-element.el: Fix some comments.
2012-04-29 22:55:37 +02:00
Nicolas Goaziou e3dfe717c8 org-export: Use (org-version) for creator string
* contrib/lisp/org-export.el (org-export-creator-string):
  Use (org-version) for creator string.
2012-04-29 15:52:14 +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 f70afc42ef org-export: Fix tests
* contrib/lisp/org-export.el (org-export-filters-alist): Remove
  unexistant filters.
2012-04-28 18:08:37 +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 b3e8a8d437 org-export: Run a hook before parsing
* contrib/lisp/org-export.el (org-export-before-parsing-hook): New
  variable.
(org-export-as): Run `org-export-before-parsing-hook'.
* testing/lisp/test-org-export.el: Add test.
2012-04-28 09:35:12 +02:00
Jambunathan K 00cc5d5cef org-export: Minor fixes
* contrib/lisp/org-export.el (org-export-creator-string):
Check for `org-version' being bound before using it.
(org-export-get-inbuffer-options): Use
`org-element-restriction'.
2012-04-22 19:47:53 +05:30
Nicolas Goaziou 0264495f52 org-export: Fix small bug
* contrib/lisp/org-export.el (org-export-get-coderef-format): Handle
  nil descriptions.
2012-04-22 19:42:47 +05:30
Nicolas Goaziou 172ae310a8 org-export: Define tools for tables, table rows and table cells
* contrib/lisp/org-export.el (org-export-table-cell-width,
  org-export-table-cell-alignment, org-export-table-cell-borders,
  org-export-table-row-group, org-export-table-has-special-column-p,
  org-export-table-row-is-special-p, org-export-get-parent-table,
  org-export-table-dimensions, org-export-table-cell-address,
  org-export-get-table-cell-at, org-export-table-has-header-p,
  org-export-table-cell-starts-colgroup-p,
  org-export-table-cell-ends-colgroup-p,
  org-export-table-row-starts-rowgroup-p,
  org-export-table-row-ends-rowgroup-p,
  org-export-table-row-starts-header-p,
  org-export-table-row-ends-header-p): New functions.
(org-export-table-format-info, org-export-clean-table): Removed
functions.
(org-export-filter-table-cell-functions,
org-export-filter-table-row-functions): New variables.
(org-export-filters-alist): Install new filters.
(org-export-collect-tree-properties, org-export--skip-p): Mark special
rows and cells as ignored.
* testing/lisp/test-org-export.el: Add tests.
2012-04-22 19:41:45 +05:30
Martyn Jago 6b6f0d625b Fix require path due to removal of EXPERIMENTAL
* contrib/lisp/org-export.el:

path relative to org-export.el has changed due
to relocation of org-e-publish.el (removal of
EXPERIMENTAL)
2012-04-21 23:51:38 +02:00
Bastien Guerry bafd9a42f8 Move EXPERIMENTAL/* into contrib/lisp/ and change org-export.el accordingly. 2012-04-21 16:22:31 +02:00
Nicolas Goaziou f0c737862d org-export: Refactor code 2012-04-17 13:33:38 +02:00
Nicolas Goaziou 36711b05ba org-export: Fix footnotes export outside parsing scope
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
  Function renamed from `org-export-initial-options'.
(org-export-store-footnote-definitions): New function.
(org-export-as): Store footnote definitions at the appropriate place.
It happens twice if buffer gets expanded.
* testing/lisp/test-org-export.el: Add test.
2012-04-13 15:47:13 +02:00
Nicolas Goaziou 2ff3da0f1a org-export: Fix footnotes bug in ODT export
* contrib/lisp/org-export.el (org-export-as): Reorder actions taken to
  fix footnotes bug in ODT export.
2012-04-07 15:14:58 +02:00
Nicolas Goaziou 763991fbda org-element: Store keywords in upper cases
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-keyword): Apply keywords
  case change.
* EXPERIMENTAL/org-e-html.el (org-e-html-keyword): Apply keywords case
  change.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-keyword): Apply keywords
  case change.
* EXPERIMENTAL/org-e-odt.el (org-e-odt-keyword): Apply keywords case change.
* contrib/lisp/org-element.el (org-element-export-block-parser):
  Internally store type in upper cases.
(org-element-keyword-parser): Internally store keyword `:key' property
in upper cases.
(org-element-non-recursive-block-alist,
org-element-affiliated-keywords,
org-element-keyword-translation-alist, org-element-multiple-keywords,
org-element-parsed-keywords, org-element-dual-keywords):
Use uppercased keywords.
(org-element-current-element): Use uppercase for keywords.
(org-element-collect-affiliated-keywords): Store affiliated keywords
in upper cases.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
  org-export-collect-tree-properties, org-export-resolve-fuzzy-link):
  Use upper cased keywords.
* testing/lisp/test-org-export.el: Update tests.
2012-03-28 14:27:15 +02:00
Nicolas Goaziou dd7aa8ece9 org-export: Fix export with Babel calls outside export scope
* contrib/lisp/org-export.el (org-export-as): Fix export with Babel
  calls outside export scope by providing buffer's name holding full
  data instead of the one holding its copy limited to scope.
* testing/lisp/test-org-export.el (test-org-export/export-scope): Add
  a test.
2012-03-22 16:49:19 +01:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry fdc20f7792 Fix more copyright years. 2012-03-17 14:39:43 +01:00