Commit Graph

1060 Commits

Author SHA1 Message Date
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 c84cda961f Fix some more comments in export back-ends 2012-05-18 21:06:12 +02:00
Nicolas Goaziou 946230bae4 A few fixes to comments and docstrings 2012-05-18 17:26:53 +02:00
Nicolas Goaziou 893a0915b5 org-e-latex: Customizable format string for broken links
* contrib/lisp/org-e-latex.el (org-e-latex-link-with-unknown-path-format):
  New variable.
(org-e-latex-link): Use new variable.
2012-05-18 12:42:32 +02:00
Nicolas Goaziou 5ab59625e6 org-e-publish: Apply #+INCLUDE keyword regexp change
* contrib/lisp/org-e-publish.el (org-e-publish-cache-file-needs-publishing):
  Make quotes mandatory around the file name and allow spaces in
  it.
2012-05-18 11:48:15 +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 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
Jambunathan K 5847931b37 org-e-odt.el: Fix italic style 2012-05-17 19:36:32 +05:30
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 5750f0869c org-element: Preserve visibility when moving elements
* contrib/lisp/org-element.el (org-element-swap-A-B): Preserve
  visibility when moving elements.
* testing/lisp/test-org-element.el: Add tests.
2012-05-11 16:07:11 +02:00
Nicolas Goaziou d71464c0d3 org-element: Handle multiple TBLFM keywords
* contrib/lisp/org-element.el (org-element-table-parser,
  org-element-table-interpreter): Handle multiple TBLFM keywords.
(org-element-collect-affiliated-keywords): Minor changes to
docstring.
* testing/lisp/test-org-element.el: Add test.
2012-05-11 15:17:14 +02:00
Nicolas Goaziou d308ea3172 org-element: Fix latex environment parsing
* contrib/lisp/org-element.el (org-element-latex-environment-parser):
  Grab value until closing of main environment block.
(org-element-current-element): Check if main block is properly closed.
* testing/lisp/test-org-element.el: Add test.
2012-05-10 23:05:42 +02:00
Christian Egli 294589270e org2hpda: Adapt to modern pdfjam
* contrib/scripts/org2hpda (all): Adapt the invocation of pdfnup and
pdfjoin to a modern version of the pdfjam package.

Since version 2.0 of pdfjam, i.e. since 2010-03-14 some of the default
values for parameters have changed. This makes sure org2hpda does the
right thing under the new circumstances.
2012-05-10 16:31:46 +02:00
Nicolas Goaziou b797c88d70 org-e-latex: Fix export of tables with a percent in caption
* contrib/lisp/org-e-latex.el (org-e-latex-table): Refactor code.
(org-e-latex-table--org-table, org-e-latex-table--table.el-table): New
functions.
(org-e-latex-table--format-string): Removed function.
2012-05-07 15:21:25 +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 cbc1c03680 org-element: Allow targets in a few more places
* contrib/lisp/org-element.el (org-element-object-restrictions): Allow
  targets in a few more places.
2012-05-07 08:53:31 +02:00
Nicolas Goaziou b5c0d7d2d1 org-e-latex: Fix table alignment for tables starting with a rule
* contrib/lisp/org-e-latex.el (org-e-latex-table--align-string): Fix
  table alignment for tables starting with a rule.
2012-05-06 20:10:21 +02:00
Nicolas Goaziou e8d291bc76 org-e-latex: Fix multicolumn handling for figures
* contrib/lisp/org-e-latex.el (org-e-latex-link--inline-image): Fix typo.
2012-05-06 08:27:56 +02:00
Paul Sexton eb48e426d5 org-drill: prevent fontifcation functions from being called when saving outline
visibility info during drill sessions. This should fix slow transitions between drill
items for some people.
2012-05-06 10:45:39 +12: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 557fad288b org-element: Silence byte-compiler 2012-05-05 21:02:47 +02:00
Nicolas Goaziou 1d0f8b2611 org-e-latex: Fix code typo
* contrib/lisp/org-e-latex.el (org-e-latex--text-markup): Fix code typo.
2012-05-05 20:09:02 +02:00
Nicolas Goaziou 64cdd8879b org-element: Fix paragraph separator
* contrib/lisp/org-element.el (org-element-paragraph-separate): Fix
  paragraph separator.
2012-05-05 18:05:33 +02:00
Nicolas Goaziou b7dbf357c3 org-element: Small modifications to comments 2012-05-05 17:43:42 +02:00
Nicolas Goaziou e4c2540b68 org-element: Add a function to fill an element
* contrib/lisp/org-element.el (org-element-fill-paragraph): New function.
* testing/lisp/test-org-element.el: Add tests.
2012-05-05 17:43:42 +02:00
Nicolas Goaziou 88032eed64 org-element: `org-element-map' applies to strings and secondary strings
* contrib/lisp/org-element.el (org-element-map): `org-element-map' now
  applies to strings and secondary strings.
* testing/lisp/test-org-element.el: Add tests.
2012-05-05 17:43:42 +02:00
Nicolas Goaziou 5cbc56a175 org-element: Small modification to `org-element-block-name-alist'
* contrib/lisp/org-element.el (org-element-block-name-alist): Directly
  store parser's name in CDR.
2012-05-05 12:41:32 +02:00
Nicolas Goaziou 761add3580 org-element: Remove an obsolete defconst
* contrib/lisp/org-element.el (org-element--element-block-re): Remove
  variable.
2012-05-05 11:31:05 +02:00
Nicolas Goaziou ed9a748057 org-element: Refactor navigation tools
* contrib/lisp/org-element.el (org-element-at-point,
  org-element-backward, org-element-up, org-element-down,
  org-element-drag-backward): Refactor.
(org-element-swap-A-B): Handle the case of the first paragraph in an
item.
(org-element-transpose): New function.
(org-transpose-elements): Removed function.
(org-element-unindent-buffer): Correctly un-indent contents of
headlines.
* testing/lisp/test-org-element.el: Add tests.
2012-05-05 09:15:33 +02:00
Nicolas Goaziou b137cdb296 org-element: Fix to footnote-definition parsing
* contrib/lisp/org-element.el (org-element-footnote-definition-parser):
Fix bug when parsing a footnote definition at end of buffer.
* testing/lisp/test-org-element.el: Add test.
2012-05-05 09:15:33 +02:00
Nicolas Goaziou 2a6b7c87f4 org-element: Remove :level attribute from plain-list elements
* contrib/lisp/org-element.el (org-element-plain-list-parser):
  Remove :level attribute from plain-list elements since it isn't
  directly related to the plain-list and can be computed during export
  process.
* contrib/lisp/org-e-latex.el (org-e-latex-item): Compute list level.
* contrib/lisp/org-e-html.el (org-e-html-item): Remove unneeded
  reference to :level attribute.
* contrib/lisp/org-e-odt.el (org-e-odt-item): Remove unneeded
  reference to :level attribute.
2012-05-05 09:15:33 +02:00
Nicolas Goaziou d83ab52626 org-element: Refactor code, add tests
* contrib/lisp/org-element.el (org-element-babel-call-parser): Be sure
  to match "#+CALL:".
(org-element-block-name-alist): New variable.
(org-element-non-recursive-block-alist): Removed variable.
(org-element-current-element): Refactor.
* testing/lisp/test-org-element.el: Add tests.
2012-05-05 09:15:33 +02:00
Paul Sexton 5412883c1d org-drill: prevent errors caused by attempting to display inline images on a non-graphical display. 2012-05-05 08:09:22 +12: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 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 172d7a6f5e org-element: Apply `org-translate-link' when parsing a link
* contrib/lisp/org-element.el (org-element-link-parser): Apply
  `org-translate-link' when parsing a link.
* testing/lisp/test-org-element.el: Add test.
2012-05-01 15:47:14 +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 4f8e1e85b2 org-element: Interpret headlines without a `:pre-blank' property
* contrib/lisp/org-element.el (org-element-headline-interpreter):
  Interpret headlines without a `:pre-blank' property.
2012-05-01 12:20:06 +02:00
Nicolas Goaziou 49228181ee org-element: code clean-up and some optimizations
* contrib/lisp/org-element.el (org-element-center-block-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-keyword-parser,
  org-element-latex-environment-parser, org-element-paragraph-parser,
  org-element-property-drawer-parser, org-element-src-block-parser,
  org-element-table-parser): Since parser will alway be called at the
  beginning of the element, simplify code.
2012-05-01 01:02:48 +02:00
Nicolas Goaziou 2ab6367daf org-element: Interpret correctly switches in example blocks
* contrib/lisp/org-element.el (org-element-example-block-interpreter):
  Interpret correctly switches in example blocks.
* testing/lisp/test-org-element.el: Add test.
2012-04-30 23:44:30 +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 15315c5cc6 org-element: Fix src-block switches parsing
* contrib/lisp/org-element.el (org-element-src-block-parser): Fix
  switches parsing.
* testing/lisp/test-org-element.el: Add test.
2012-04-30 18:21:35 +02:00
Nicolas Goaziou 99a5d6bea8 org-element: Small fix to previous commit
* contrib/lisp/org-element.el (org-element-export-snippet-parser):
  Small fix.
* testing/lisp/test-org-export.el: Fix test.
2012-04-30 17:49:55 +02:00
Nicolas Goaziou 803d76825a org-element: Change to export-snippet syntax
* contrib/lisp/org-element.el (org-element-export-snippet-parser):
  Change syntax from @back-end{contents} to <back-end@contents>.
(org-element-export-snippet-successor): Use new syntax
* testing/lisp/test-org-element.el: Add test.

This change is required as curly braces conflict with LaTeX syntax
when trying to break a command in two parts.  On the other hand, HTML
tags can be broken easily in two.  More explicitely, both the
following constructs are possible now:

  <latex@\textsc{>Name<latex@}> and <html@<b>>
2012-04-30 17:34:01 +02:00