Commit Graph

775 Commits

Author SHA1 Message Date
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
Jambunathan K e0f59dfb05 (org-e-html-footnote-separator): Remove duplicate `
Also re-arrange defcustoms in alphabetical order.
2012-07-25 00:24:07 +05:30
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 9a2e479b32 org-e-beamer: Fix docstring typo 2012-07-23 09:51:55 +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 3a633732b7 org-e-ascii: Fix typo
* contrib/lisp/org-e-ascii.el (org-e-ascii-horizontal-rule): Fix typo.
2012-07-23 09:43:29 +02:00
Nicolas Goaziou c92913b5f9 org-e-latex: Allow multiple objects and spaces in sub/superscript
* contrib/lisp/org-e-latex.el (org-e-latex-subscript,
  org-e-latex-superscript): Allow multiple objects and spaces in
  sub/superscript.
2012-07-22 13:55:10 +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 eed478ffaa org-e-beamer: Small docstring changes
* contrib/lisp/org-e-beamer.el (org-e-beamer-export-as-latex,
  org-e-beamer-export-to-pdf): Small docstring changes.
2012-07-20 13:48:19 +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
Jambunathan K 99ef5728a2 org-e-odt.el: Fix more compilation errors 2012-07-19 23:15:44 +05:30
Jambunathan K dc92a8dbff org-e-odt.el: Fix all compilation errors
Rearrange and rename for greater consistency and clarity.  More cleanups
will follow.
2012-07-19 22:15:30 +05:30
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 ea7b5a327f org-e-ascii: Fix link description in empty section
* contrib/lisp/org-e-ascii.el (org-e-ascii-headline): Fix link
  description in empty section.
2012-07-18 19:24:11 +02:00
Nicolas Goaziou 17b865ddd0 org-element: Fix first section parsing
* contrib/lisp/org-element.el (org-element-current-element): Use a new
  special mode symbol to treat section before first headline
  differently.  In this case, its boundaries must be computed since it
  has not been limited by headline container.
(org-element-parse-elements): Use new special mode symbol.
2012-07-18 19:17:12 +02:00
Nicolas Goaziou 8bf8cf8223 org-element: Allow links and export snippets in descriptions lists items tag
* contrib/lisp/org-element.el (org-element-object-restrictions): Allow
  links and export snippets in descriptions lists items tag.
2012-07-18 18:23:26 +02:00
Nicolas Goaziou d80661e764 org-e-latex: Don't use mathrm in sub/superscripts with a single LaTeX command or entity
* contrib/lisp/org-e-latex.el (org-e-latex-subscript,
  org-e-latex-superscript): Don't use mathrm in sub/superscripts with
  a single LaTeX command or entity.
2012-07-18 17:02:08 +02:00
Nicolas Goaziou 3e76a25f7c org-element: Fix inlinetask parsing
* contrib/lisp/org-element.el (org-element-inlinetask-parser): Fix
  inlinetask parsing.
2012-07-18 11:24:40 +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 8a9429f9c3 org-element: Fix timestamp interpreter
* contrib/lisp/org-element.el (org-element-timestamp-interpreter): Fix
  timestamp interpreter.
2012-07-17 20:47:01 +02:00
Nicolas Goaziou 528b17ea15 org-export: Adapt back-ends to timestamp object change
* contrib/lisp/org-e-ascii.el (org-e-ascii-timestamp): Use :range-end
  property when applicable.
* contrib/lisp/org-e-html.el (org-e-html-timestamp): Use :range-end
  property when applicable.
* contrib/lisp/org-e-latex.el (org-e-latex-timestamp): Use :range-end
  property when applicable.
* contrib/lisp/org-e-odt.el (org-e-odt-timestamp): Use :range-end
  property when applicable.
2012-07-17 17:03:29 +02:00
Nicolas Goaziou a1634b4489 org-element: Store parsed timestamps without the bracket markers
* contrib/lisp/org-element.el (org-element-planning-parser): Store
  parsed timestamps without the bracket markers.
(org-element-timestamp-interpreter): Store parsed timestamps without
  the bracket markers.  Also provide a new property: `:range-end'.
(org-element-planning-interpreter, org-element-timestamp-interpreter):
Apply changes to parsers.
* testing/lisp/test-org-element.el: Add test.
2012-07-17 16:51:19 +02:00
Nicolas Goaziou e4a300d90d org-element: Fix error when parsing a line-break
* contrib/lisp/org-element.el (org-element-line-break-parser)
(org-element-line-break-interpreter): Line-break object ends where the
line ends.  It doesn't contain the next newline character.
(org-element-parse-objects): Refactoring.
2012-07-17 11:53:41 +02:00
Nicolas Goaziou 69af0913b2 org-element: Normalize contents of elements in place
* contrib/lisp/org-element.el (org-element-normalize-contents):
  Normalize contents of elements in place.  This is required to be
  sure that a normalized element still is `eq' to its equivalent in
  the parse tree.
2012-07-17 00:46:08 +02:00
Nicolas Goaziou 4cf88ac31d org-e-ascii: Fix export of tables with a special column or a top-left corner
* contrib/lisp/org-e-ascii.el (org-e-ascii--table-cell-width,
  org-e-ascii-table-row): Fix export of tables with a special column
  or a top-left angle.
2012-07-16 22:53:53 +02:00
Nicolas Goaziou 5dbd1386f3 org-e-ascii: Comment fix 2012-07-16 18:17:56 +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
Jambunathan K 4a53af87de org-e-odt.el: Fix previous commit 2012-07-16 03:43:01 +05:30
Jambunathan K 4aec2e6937 org-e-odt.el: Refactor and rearrange 2012-07-16 03:38:07 +05:30
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 a605067181 org-element: Silence byte-compiler 2012-07-15 14:35:04 +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 b6edf5649c org-element: Inline accessors
* contrib/lisp/org-element.el (org-element-type, org-element-property,
  org-element-contents, org-element-restriction): Inline functions.
2012-07-15 12:27:54 +02:00
Nicolas Goaziou ebad68a059 org-export: Fix table test failure
* contrib/lisp/org-element.el (org-element-center-block-parser,
  org-element-drawer-parser, org-element-dynamic-block-parser,
  org-element-footnote-definition-parser, org-element-headline-parser,
  org-element-inlinetask-parser, org-element-item-parser,
  org-element-plain-list-parser, org-element-quote-block-parser,
  org-element-section-parser, org-element-special-block-parser,
  org-element-babel-call-parser, org-element-clock-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-keyword-parser, org-element-latex-environment-parser,
  org-element-paragraph-parser, org-element-planning-parser,
  org-element-property-drawer-parser,
  org-element-quote-section-parser, org-element-src-block-parser,
  org-element-table-parser, org-element-table-row-parser,
  org-element-verse-block-parser, org-element-bold-parser,
  org-element-code-parser, org-element-entity-parser,
  org-element-export-snippet-parser,
  org-element-footnote-reference-parser,
  org-element-inline-babel-call-parser,
  org-element-inline-src-block-parser, org-element-italic-parser,
  org-element-latex-fragment-parser, org-element-line-break-parser,
  org-element-link-parser, org-element-macro-parser,
  org-element-radio-target-parser,
  org-element-statistics-cookie-parser,
  org-element-strike-through-parser, org-element-subscript-parser,
  org-element-superscript-parser, org-element-table-cell-parser,
  org-element-target-parser, org-element-timestamp-parser,
  org-element-underline-parser, org-element-verbatim-parser): Use
  `list' instead of backquotes to avoid using a quoted constant list
  as a non-last argument to `nconc'.
2012-07-15 12:25:09 +02:00
Nicolas Goaziou ceaeb33629 org-element: Handle special cases in setter functions
* contrib/lisp/org-element.el (org-element-put-property,
  org-element-set-contents): Handle special cases like empty or string
  arguments.
(org-element-parse-secondary-string): Correctly set `:parent' property
in objects within the secondary string if element or object containing
it is provided as an optional argument.
(org-element-parse-elements, org-element-parse-objects): Rewrite
functions using setter functions.
2012-07-15 12:25:09 +02:00
Jambunathan K f0d5d935ce org-e-odt.el: Introduced `org-e-odt--export-wrap'
- Clean up work directory and buffers on error.
- Don't use `org-current-export-file'.
- Handle file paths robustly i.e., don't rely on `default-directory'.
- Remove stale code.
2012-07-14 18:21:31 +05:30
Nicolas Goaziou 373cb5a37e org-export: Silence byte-compiler 2012-07-14 12:05:20 +02:00
Jambunathan K 90a20261f1 org-e-html.el: Use `org-export-dictionary'
Don't use `org-export-language-setup'.  Lots of miscellaneous cleanups to
enable clean compilation.
2012-07-13 03:26:13 +05:30
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 c75120aa71 org-element: Refactoring 2012-07-11 14:17:02 +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 d9f975cf7b org-element: Add setters to modify parse tree
* contrib/lisp/org-element.el (org-element-put-property,
  org-element-set-contents, org-element-adopt-element): New
  functions.
* testing/lisp/test-org-element.el: Add tests.
2012-07-10 17:23:33 +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