Commit graph

794 commits

Author SHA1 Message Date
Luis Anaya c9d0a486cc Org-Export exporters for Groff and Man Pages. Uses the new
org-export.el for operation.
2012-07-28 16:20:41 -04:00
Achim Gratz c2735e7c19 Re-apply (correctly): Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 07:06:25 +02:00
Achim Gratz 234df465ad Revert "Move org-element.el from contrib/lisp to lisp/."
This reverts commit abbea59611.
2012-07-28 07:02:21 +02:00
Bastien Guerry 88fd65f251 Merge branch 'master' of orgmode.org:org-mode 2012-07-28 00:57:14 +02:00
Bastien Guerry abbea59611 Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 00:55:45 +02:00
Nicolas Goaziou 144f2a3f9e org-md: Fix docstring
* contrib/lisp/org-md.el (org-md-headline-style): Fix docstring.
2012-07-28 00:49:58 +02:00
Nicolas Goaziou 5dac2ca753 org-e-ascii: Fix error when formatting an headline with a priority
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title): Fix error
  when formatting an headline with a priority.
2012-07-28 00:44:07 +02:00
Nicolas Goaziou edaa0c4ee7 org-md: Fix error when formatting an headline with a priority
* contrib/lisp/org-md.el (org-md-headline): Fix error when formatting
  an headline with a priority.
2012-07-27 23:05:34 +02:00
Nicolas Goaziou 029e499939 org-md: Fix spurious white space in Setext style
* contrib/lisp/org-md.el (org-md-headline): Fix spurious white space
  in Setext style.
2012-07-27 22:58:49 +02:00
Nicolas Goaziou 7b6e6e9ff5 org-md: Allow atx and Setext style for headlines
* contrib/lisp/org-md.el (org-export-md): New customize group.
(org-md-headline-style): New variable.
(org-md-headline): Allow atx and Setext style.  Also provide fall-back
for low level headlines.
2012-07-27 22:53:38 +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 f3e264af56 org-md: Add missing chuck from previous patch (536c55b)
* contrib/lisp/org-md.el (org-md-section): # protection shouldn't
  happen at the section level, when there is no difference between raw
  # from export blocks and # in plain text.
2012-07-27 14:43:12 +02:00
Nicolas Goaziou 536c55b644 org-md: Be more subtle when protecting #
* contrib/lisp/org-md.el (org-md-paragraph, org-md-plain-text): Make
  sure raw # (inserted with, for example, an export snippet) don't get
  escaped.  A few false positives don't hurt.
2012-07-27 14:05:44 +02:00
Nicolas Goaziou c8acf8d695 org-export and back-ends: Fix some docstrings 2012-07-26 15:33:27 +02:00
Nicolas Goaziou 065401cfdb org-md: Export back-end for Markdown format
* contrib/lisp/org-md.el: New file.
2012-07-26 12:41:26 +02:00
Nicolas Goaziou b6b40424d2 org-e-ascii: Center shortened horizontal rules
* contrib/lisp/org-e-ascii.el (org-e-ascii-horizontal-rule): Center
  shortened horizontal rules.
2012-07-25 12:55:00 +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
Bastien Guerry f06a4db2be org-export-generic.el: Add require 'cl for defmacro*. 2012-07-25 08:32:54 +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
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