Commit Graph

648 Commits

Author SHA1 Message Date
Jambunathan K 8ee5ce1d2b org-e-odt.el: Fix example, fixed width, QUOTE and verse blocks 2012-05-26 02:55:22 +05:30
Jambunathan K b00eeb4d5a org-e-odt.el: Some cleanups 2012-05-26 00:09:53 +05:30
Nicolas Goaziou 8d96bbc5c3 org-element: Update entities regexp
* contrib/lisp/org-element.el (org-element-entity-parser, org-element-latex-or-entity-successor):
Update entities regexp.
2012-05-25 16:53:32 +02:00
Jambunathan K f12e41e37c org-e-odt: Handle quotation marks etc
Handle quotation marks, special strings, line breaks

Avoid corrupt of ODT files when
`nxml-auto-insert-xml-declaration-flag' is on.
2012-05-25 09:29:05 +05:30
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 00a4bf0663 org-e-latex: Reordering functions 2012-05-23 16:29:16 +02:00
Nicolas Goaziou 4721052ec6 org-e-ascii: Small refactoring
* contrib/lisp/org-e-ascii.el (org-e-ascii--unique-links): Small refactoring.
2012-05-21 21:54:09 +02:00
Nicolas Goaziou dc976e1139 org-export: Only number elements with a caption
* contrib/lisp/org-export.el (org-export-collect-elements): Collect
  elements with a caption only.
(org-export-collect-tables, org-export-collect-figures,
org-export-collect-listings): Update docstring.
* contrib/lisp/org-e-ascii.el (org-e-ascii--has-caption-p): Renamed
  from `org-e-ascii--has-caption-or-name-p'.
(org-e-ascii-link): Use previous function.
(org-e-ascii--build-caption, org-e-ascii--list-listings,
org-e-ascii--list-tables): Do not use #+NAME keyword as a fallback caption.
2012-05-21 21:38:42 +02:00
Nicolas Goaziou 42f7ba0d02 org-element: Fix ill-defined keywords parsing
* contrib/lisp/org-element.el (org-element-comment-parser):
  Ill-defined keywords (without the colons) are treated as comments.
(org-element-comment-interpreter): Apply changes to lexer.
* testing/lisp/test-org-element.el: Add test.
2012-05-20 17:33:36 +02:00
Nicolas Goaziou 65c0e18892 org-e-ascii: Ensure consistent cross-referencing between elements and links
* contrib/lisp/org-e-ascii.el (org-e-ascii--has-caption-or-name-p):
  New function.
(org-e-ascii--build-caption, org-e-ascii-link): Use new function.

This patch ensures only elements with a name or a caption are counted
in when a fuzzy link pointing to an element is resolved.
2012-05-20 13:57:58 +02:00
Nicolas Goaziou 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 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
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