Commit Graph

733 Commits

Author SHA1 Message Date
Nicolas Goaziou fd5a4f7d36 Merge branch 'maint' 2013-10-13 10:20:58 +02:00
Nicolas Goaziou 11514badc1 org-element: Parse warning delays in timestamps
* lisp/org-element.el (org-element-timestamp-parser,
  org-element-timestamp-interpreter): Parse warning delays.
* testing/lisp/test-org-element.el (test-org-element/timestamp): Add
  tests.
2013-10-13 10:17:16 +02:00
Nicolas Goaziou 379e2b1bea Merge branch 'maint' 2013-10-07 19:10:46 +02:00
Nicolas Goaziou 2280ad5eca ox: Fix a test
* testing/lisp/test-ox.el (test-org-export/with-backend): Fix test.
2013-10-07 19:09:55 +02:00
Nicolas Goaziou 21b11071d3 Merge branch 'maint' 2013-10-07 17:06:10 +02:00
Nicolas Goaziou 58b157956c ox: Fix `org-export-with-backend'
* lisp/ox.el (org-export-with-backend): Ensure function will use
  provided back-end.
* testing/lisp/test-ox.el: Add test.
2013-10-07 16:58:20 +02:00
Nicolas Goaziou e09ffe2a67 ox: Add a defcustom to export properties drawers
* lisp/ox.el (org-export-with-drawers): Improve docstring.
(org-export-with-properties): New variable
(org-export--skip-p): Handle new variable.
(org-export-options-alist): Install new variable.
* lisp/ox-ascii.el (org-ascii-node-property,
  org-ascii-property-drawer): New functions.
* lisp/ox-html.el (org-html-node-property): New function.
(org-html-property-drawer): Export property drawers as "pre" blocks.
* lisp/ox-latex.el (org-latex-property-drawer,
  org-latex-node-property): New functions.
* lisp/ox-man.el (org-man-node-property, org-man-property-drawer): New
  functions.
* lisp/ox-md.el (org-md-node-property, org-md-property-drawer): New
  functions.
* lisp/ox-odt.el (org-odt-node-property): New function.
(org-odt-property-drawer): Export property drawers as fixed width
blocks.
* lisp/ox-texinfo.el (org-texinfo-node-property): New function.
(org-texinfo-property-drawer): Export property drawers as verbatim
blocks.
* doc/org.texi: Update manual.
* testing/lisp/test-ox.el: Add tests.
2013-09-26 13:46:31 +02:00
Nicolas Goaziou 7cf4406088 ox: Ignore text before first headline with an :export: tag
* lisp/ox.el (org-export--populate-ignore-list): Ignore text before
  first headline if an :export: tag (or a select tag) is found within
  the buffer.
* testing/lisp/test-ox.el: Add tests.
2013-09-25 18:49:39 +02:00
Nicolas Goaziou 41cf6f2a36 org-element: Fix `org-element-at-point' at end of buffer
* lisp/org-element.el (org-element-at-point): If point is at the end
  of the buffer, and that buffer ends with a list, and there's no
  final newline, return last element in last item instead of plain
  list.
* testing/lisp/test-org-element.el: Add test.

This fix allows to fill correctly the following construct:

 - Item with a very long line ending at the end of buffer.
2013-09-18 21:15:04 +02:00
Nicolas Goaziou 43733e33b1 New functions for paragraph-like navigation
* lisp/org.el (org-forward-paragraph, org-backward-paragraph): New
  functions.
* testing/lisp/test-org.el: Add tests.
2013-09-14 00:23:54 +02:00
Michael Brand 8e07014036 Add ERTs for org-meta-return
* testing/lisp/test-org.el (test-org/meta-return): New `ert-deftest'
to test `org-meta-return'.
2013-09-12 22:57:07 +02:00
Nicolas Goaziou 7b4d8bb614 org-element: Fix footnote definition parsing
* lisp/org-element.el (org-element-footnote-definition-parser): Fix
  value for :contents-begin when first line of footnote definition is
  empty besides the label.
* testing/lisp/test-org-element.el (test-org-element/footnote-definition-parser):
  Add test.
2013-09-11 17:12:26 +02:00
Nicolas Goaziou af9c0fbf91 org-element: Fix bug in `org-element-at-point'
* lisp/org-element.el (org-element-at-point): Return correct element
  when point is on a blank line just below a headline.
* testing/lisp/test-org-element.el: Add test.
2013-09-11 12:22:05 +02:00
Nicolas Goaziou 2e3f5558d7 Do not handle `adaptive-fill-regexp' in comments
* lisp/org.el (org-adaptive-fill-function): Do not handle
  `adaptive-fill-regexp' in comments as the behaviour is not
  satisfying.
* testing/lisp/test-org.el: Remove test.
2013-09-06 12:32:13 +02:00
Nicolas Goaziou 5fdb93eb39 Merge branch 'maint' 2013-09-04 15:26:11 +02:00
Nicolas Goaziou 29c2827469 org-list: Fix list repairing
* lisp/org-list.el (org-list-struct-apply-struct): Do not move item's
  contents within a child above when repairing indentation.
* testing/lisp/test-org-list.el: Add tests.
2013-09-04 15:21:33 +02:00
Nicolas Goaziou 580b7fce95 Merge branch 'maint' 2013-08-31 14:34:37 +02:00
Nicolas Goaziou 22b4473fcc ox: Do not build TOC for headlines below H value
* lisp/ox.el (org-export-collect-headlines): Do not build TOC for
  headlines below H value.
* testing/lisp/test-ox.el: Add test.

Reported-by: Jambunathan K <kjambunathan@gmail.com>
2013-08-31 14:30:25 +02:00
Nicolas Goaziou c33e04dcf2 Merge branch 'maint' 2013-08-30 14:22:07 +02:00
Nicolas Goaziou 026b99ecb8 org-element: Fix parsing error in `org-element-context'
* lisp/org-element.el (org-element-text-markup-successor,
  org-element-latex-or-entity-successor,
  org-element-export-snippet-successor,
  org-element-footnote-reference-successor,
  org-element-inline-babel-call-successor,
  org-element-inline-src-block-successor,
  org-element-line-break-successor, org-element-link-successor,
  org-element-plain-link-successor, org-element-macro-successor,
  org-element-radio-target-successor,
  org-element-statistics-cookie-successor,
  org-element-sub/superscript-successor,
  org-element-table-cell-successor, org-element-target-successor,
  org-element-timestamp-successor): Remove LIMIT argument.
(org-element--parse-objects, org-element--get-next-object-candidates):
Apply signature change to successors.
(org-element-context): Narrow buffer around object containers so
parsing of objects when using this function is done under the same
restrictions as in buffer parsing.
* testing/lisp/test-org-element.el: Add test.
2013-08-30 14:19:30 +02:00
Nicolas Goaziou 54431e2a5b Merge branch 'maint' 2013-08-22 21:55:51 +02:00
Nicolas Goaziou 9e51049b22 Fix filling with `adaptive-fill-regexp'
* lisp/org.el (org-adaptive-fill-function): Look for a fill prefix at
  the beginning of the paragraph and subsquently on its second line
  instead of the current line.
* testing/lisp/test-org.el: Add test
2013-08-22 21:54:52 +02:00
Nicolas Goaziou 6fdc2361c9 ob-core: Fix wrong indentation of results
* lisp/ob-core.el (org-babel-get-src-block-info): Look for indentation
  value at the correct location.
* testing/lisp/test-ob.el: Add test.
2013-08-21 14:16:28 +02:00
Nicolas Goaziou cf8cc35ec5 ox: Fix test errors
* lisp/ox.el (org-export-data-with-backend): Set temporary back-end as
  the new back-end in local communication channel.
(org-export-filter-apply-functions): Handle corner case where back-end
is nil.
* testing/lisp/test-ox.el: Small refactoring.
2013-08-12 10:42:05 +02:00
Nicolas Goaziou 9154c70a04 Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
  org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
  org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
  org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
  org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
  org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
  org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
  org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
  org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
  org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
  org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 16:11:42 +02:00
Nicolas Goaziou aef1b17773 Merge branch 'maint' 2013-07-28 10:17:17 +02:00
Nicolas Goaziou 36161345d1 Reintroduce support for `adaptive-fill-regexp' in paragraphs and comments
* lisp/org.el (org-adaptive-fill-function, org-fill-paragraph): Add
  support for `adaptive-fill-regexp' in paragraphs and comments.
* testing/lisp/test-org.el: Add tests.
2013-07-28 10:16:03 +02:00
Nicolas Goaziou 908d42c9b6 ox: Multiple options can be set through the same keyword
* lisp/ox.el (org-export--get-inbuffer-options): Multiple options can
  now be set through the same buffer keyword.
* testing/lisp/test-ox.el: Add test.
2013-07-22 15:15:01 +02:00
Nicolas Goaziou 95dd398f6a Merge branch 'maint'
Conflicts:
	testing/lisp/test-org-element.el
2013-07-21 15:54:08 +02:00
Nicolas Goaziou b4a8ec9321 org-element: Fix infloop when parsing a list at the end of buffer
* lisp/org-element.el (org-element-plain-list-parser): Fix infloop
  when parsing a list at the end of buffer, if buffer doesn't end at
  a line beginning.
* testing/lisp/test-org-element.el: Add test.
2013-07-21 15:51:14 +02:00
Nicolas Goaziou 5074999605 Merge branch 'maint' 2013-07-10 14:14:18 +02:00
Nicolas Goaziou 136081a0d4 Use empty commented lines as separators when filling comments
* lisp/org.el (org-fill-paragraph): Use empty commented lines as
  separators when filling comments.  This mimics default behaviour
  from "newcomment.el", which is not used in Org.
* testing/lisp/test-org.el: Add tests.
2013-07-10 14:13:39 +02:00
Nicolas Goaziou d5c11e6b5a Merge branch 'maint' 2013-07-09 13:53:36 +02:00
Nicolas Goaziou c78fa35252 Fix error when filling consecutive comments
* lisp/org.el (org-fill-paragraph): Do not mix consecutive comments
  when filling any of them.
* testing/lisp/test-org.el: Add test.

Thanks to Samuel Wales for reporting it.
2013-07-09 13:52:00 +02:00
Nicolas Goaziou 0bab94dedf Merge branch 'maint' 2013-07-06 00:41:04 +02:00
Nicolas Goaziou 0aa0fdd971 org-element: Fix interpretation of empty items
* lisp/org-element.el (org-element-item-interpreter): This patch fixes
  "(wrong-type-argument arrayp nil)" error when trying to interpret
  empty items.
* testing/lisp/test-org-element.el: Add test.
2013-07-06 00:39:28 +02:00
Nicolas Goaziou acb351444e Merge branch 'maint' 2013-07-05 21:14:43 +02:00
Nicolas Goaziou e5630add27 org-element: Fix "*" itemized plain lists interpretation
* lisp/org-element.el (org-element-item-interpreter): Correctly
  interpret back plain lists with "*" items.  This fixes "This is not
  a list" error returned in this case.
* testing/lisp/test-org-element.el: Add test.
2013-07-05 21:12:47 +02:00
Nicolas Goaziou cea0434c4f ox: Change back-ends internal representation to structures
* lisp/ox.el (org-export--registered-backends): Renamed from
  `org-export-registered-backends'.
(org-export-invisible-backends): Removed variable.
(org-export-get-backend, org-export-get-all-transcoders
org-export-get-all-options, org-export-get-all-filters): New
functions.  It replaces `org-export-backend-translate-table'.
(org-export-barf-if-invalid-backend, org-export-derived-backend-p,
org-export-define-backend, org-export-define-derived-backend):
Rewrite functions using new representation.
(org-export-backend-translate-table): Remove function.
(org-export-get-environment): Use new function.
(org-export--get-subtree-options, org-export--parse-option-keyword,
org-export--get-inbuffer-options, org-export--get-global-options,
org-export-to-buffer org-export-to-file, org-export-string-as
org-export-replace-region-by): Update docstring.
(org-export-data-with-translations): Remove function.  Use
`org-export-data-with-backend' with a temporary back-end instead.
(org-export-data-with-backend, org-export-as): Reflect new definition
for back-ends.
(org-export--dispatch-action, org-export--dispatch-ui): Reflect new
definition for back-ends and variable removal.  Refactoring.
(org-export-filter-apply-functions): Call functions with
current back-end's name, not full back-end.
* lisp/org.el (org-export-backends, org-create-formula--latex-header):
Use new structure and variables.
* testing/lisp/test-ox.el: Update tests.

This patch separates back-end definition from its registration.  Thus,
it allows to use anonymous or unregistered back-ends.
2013-07-04 14:17:49 +02:00
Michael Brand f7e6f1589d Babel: use NAME for src block calls in ERT
* testing/examples/babel.org(use case of reading entry properties):
Adapt to use the new introduced #+NAME for src block calls.
* testing/lisp/test-ob-exp.el(ob-exp/use-case-of-reading-entry-properties):
Adapt to use the new introduced #+NAME for src block calls.
2013-07-01 08:10:11 -06:00
Eric Schulte 22b27789a9 mark a test as expected to fail 2013-06-30 17:53:57 -06:00
Michael Brand b01871f23e Babel: use case of reading entry properties as an ERT
* testing/examples/babel.org: Add test entry for ERT.
* testing/lisp/test-ob-exp.el(ob-exp/use-case-of-reading-entry-properties):
Add expected source block results for ERT.
2013-06-26 11:09:21 -06:00
Eric Schulte 685b296724 evaluate elisp header args at original call site
* lisp/ob-core.el (org-babel-execute-src-block): Ensure that the
  location is set before anything else is done.
* lisp/ob-ref.el (org-babel-ref-parse): Evaluate Emacs Lisp values in
  header arguments at the location of the original code block.
* testing/lisp/test-ob.el (test-ob/location-of-header-arg-eval): Test
  defending the new header argument evaluation behavior.
2013-06-25 09:59:56 -06:00
Nicolas Goaziou acb00702d5 Merge branch 'maint' 2013-06-25 17:38:43 +02:00
Nicolas Goaziou 838e849bf7 org-element: Fix org-meta-return error at the end of buffer
* lisp/org-element.el (org-element--current-element): Fix
  org-meta-return error at the end of buffer.
* testing/lisp/test-org-element.el: Add test.

Thanks to Nicolas Richard for reporting this.
2013-06-25 17:37:48 +02:00
Achim Gratz 36d9a7a4e3 testing: provide tests for header-args[:lang] properties 2013-06-23 19:35:15 +02:00
Nicolas Goaziou 4788a58e71 Merge branch 'maint' 2013-06-18 22:48:08 +02:00
Nicolas Goaziou 60899b1a2f ox: Fix fuzzy link resolution before first headline
* lisp/ox.el (org-export-resolve-fuzzy-link): Fix link resolution when
  link lives before the first headline.
* testing/lisp/test-ox.el: Add test.
2013-06-18 22:29:49 +02:00
Nicolas Goaziou 5e3c3f93bf Merge branch 'maint' 2013-06-17 17:17:24 +02:00
Nicolas Goaziou dffdc499ea org-element: Fix special block parsing
* lisp/org-element.el (org-element-special-block-parser): Fix typo in
  regexp matching block type.  Also quote the type so it can contain
  special characters.
* testing/lisp/test-org-element.el: Add test.
2013-06-17 17:15:55 +02:00
Achim Gratz e23bd6df8a testing/examples/babel.org: quote :shebang
* testing/examples/babel.org: Quote :shebang header argument.

2a73e06 introduced a new behaviour for org-babel-read and values
starting with "#" must now be quoted.
2013-06-08 22:06:57 +02:00
Rüdiger Sonderfeld cdfcc064d2 ob-C: Add list support.
* lisp/ob-C.el (org-babel-C-var-to-C): Add list support
(org-babel-C-val-to-C-list-type, org-babel-C-val-to-C-type,
org-babel-C-format-val): New functions.
(org-babel-C-ensure-main-wrap, org-babel-execute:C,
org-babel-execute:C++, rg-babel-execute:cpp, org-babel-C++-compiler,
org-babel-C-compiler): Improve docstring.
* testing/examples/ob-C-test.org (string_var): Add required std::
(Array): Add missing ID.
(Matrix): Add tests for list support.
* testing/lisp/test-ob-C.el (ob-C/table): Test succeeds.
(ob-C/list-var, ob-C/vector-var, ob-C/list-list-var): Add tests for
list support.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2013-06-06 12:06:26 -06:00
Litvinov Sergey d7e884d86c Add a matrix input to ob-fortran.el
* lisp/ob-fortran.el: add a branch which handles nested lists
* testing/examples/ob-fortran-test.org: add a test for matrix input
* testing/lisp/test-ob-fortran.el: add a test for matrix input
2013-06-03 22:56:23 -06:00
Nicolas Goaziou d8b983b85a org-element: Fix failing "plain-list-parser" test
* lisp/org-element.el (org-element--list-struct): Fix failing
  "plain-list-parser" test.
* testing/lisp/test-org-element.el: Update test.
2013-06-01 21:38:15 +02:00
Achim Gratz e63a7ff70c org-test: prepare for more selective batch testing
* testing/org-test.el: Conditionalize interactive setup on
  bound-and-true `org-batch-test'.  (org-id-locations-file): New
  defvar.  (org-test-run-batch-tests): Use `org-id-locations-file'
  defined before and add optional argument `org-test-selector' to
  control which tests to run.

This change introduces ability to select the tests to run for batch
testing and removes several dependencies not needed during batch test
when `org-batch-test' is defined in preparation for a corresponding
change in how the build system invokes batch testing.  Full backward
compatibility is maintained.
2013-06-01 11:31:07 +02:00
Nicolas Goaziou d3eaa6abb6 Merge branch 'maint' 2013-05-25 14:37:01 +02:00
Nicolas Goaziou 87ab99f563 org-element/ox: Fix src-block indentation when it should be preserved
* lisp/org-element.el (org-element--remove-indentation): New function.
(org-element-example-block-parser, org-element-src-block-parser): Use
new function.
(org-element-src-block-interpreter): Update function according to
change.
* lisp/ox.el (org-export-unravel-code): Do not remove any indentation
  since it now happens at the parser level.
* testing/lisp/test-org-element.el: Add tests.
* testing/lisp/test-ox.el: Refactor tests.
2013-05-25 14:35:24 +02:00
Nicolas Goaziou 63531fb2cc Merge branch 'maint' 2013-05-18 18:26:56 +02:00
Nicolas Goaziou 62296ceb88 ox: Improve speed wrt table export
* lisp/ox.el (org-export-resolve-fuzzy-link): Change property name
  holding cache.
(org-export-table-has-header-p, org-export-table-row-group,
org-export-table-cell-width, org-export-table-cell-alignment): Cache
results.
(org-export-table-cell-address): Refactor.
(org-export-get-parent): Inline function.
* testing/lisp/test-ox.el: Update tests.
2013-05-18 18:20:46 +02:00
Nicolas Goaziou 15baadd8af Merge branch 'maint' 2013-05-15 21:20:29 +02:00
Nicolas Goaziou b70e77343a Fix options bug introduced in 16f12e
* lisp/ox.el (org-export-options-alist): Change default value
  for :title property.
(org-export--default-title): New dynamically scoped variable.
(org-export-store-default-title): New function.
(org-export--get-buffer-attributes): Remove title handling.
(org-export--get-global-options): Revert "ox: Fix default
title" (16f12e0aef).  Refactor code.
* testing/lisp/test-ox.el: Update a test.
2013-05-15 21:19:28 +02:00
Bastien Guerry 8b15ff9d07 Merge branch 'maint' 2013-05-15 16:31:54 +02:00
Bastien Guerry 838e421bf5 Fix tests wrt commit 0c31a4fc 2013-05-15 16:31:44 +02:00
Nicolas Goaziou 7dc2babf29 Merge branch 'maint' 2013-05-12 20:45:01 +02:00
Nicolas Goaziou 48e51fe5d9 ox: Ignore whitespace differences when resolving a radio link
* lisp/ox.el (org-export-resolve-radio-link): Ignore whitespace
  differences when resolving a radio link.
* testing/lisp/test-ox.el: Add test.
2013-05-12 20:42:30 +02:00
Nicolas Goaziou d542097aa3 Merge branch 'maint' 2013-05-12 17:56:14 +02:00
Nicolas Goaziou e7cd6f1875 ox: Fix radio target resolution
* lisp/ox.el (org-export-resolve-radio-link): Fix radio target
  resolution.
* testing/lisp/test-ox.el: Add test.
2013-05-12 17:54:56 +02:00
Nicolas Goaziou a09d968d30 Merge branch 'maint' 2013-05-12 17:16:41 +02:00
Nicolas Goaziou 7d37898371 org-element: Be stricter when matching arguments in LaTeX environments
* lisp/org-element.el (org-element--current-element): Be stricter when
  matching arguments in LaTeX environments.  In particular, do not
  allow anything else than options and arguments in the opening line.
* testing/lisp/test-org-element.el: Add tests.
2013-05-12 17:15:06 +02:00
Nicolas Goaziou 77368d13fa Merge branch 'maint' 2013-05-08 16:01:45 +02:00
Nicolas Goaziou 16f12e0aef ox: Fix default title
* lisp/ox.el (org-export--get-global-options): Properly set default
  title, i.e. when to TITLE keyword is provided.
* testing/lisp/test-ox.el: Add tests.
2013-05-08 16:00:18 +02:00
Nicolas Goaziou 5a14001b5e Merge branch 'maint' 2013-05-08 10:11:07 +02:00
Nicolas Goaziou be794a2a30 org-element: Fix visible-only parsing
* lisp/org-element.el (org-element--parse-elements): Also parse
  visible headlines within an otherwise compacted headline.
* testing/lisp/test-org-element.el: Add test.
2013-05-08 10:10:29 +02:00
Michael Brand 9998f2c897 Escape double quotes in URL passed to browse-url
Escape double quotes in URL passed to browse-url

* lisp/org.el (org-link-escape-chars-browser): Add char double quote.
* lisp/org.el (org-open-at-point): Make use of the constant
`org-link-escape-chars-browser'.
* testing/lisp/test-org.el
(test-org/org-link-unescape-ascii-extended-char): Fill paragraph.
(test-org/org-link-escape-url-with-escaped-char): Fill paragraph and
typo.
(test-org/org-link-escape-chars-browser): New test.

This is to make work to open the Org link
[[http://some.host.com/search?q="Org mode"]] in a browser.

From 28726bcc7b7c440d70e2d95ea5a61d0cd5f084ea Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.ch.brand@gmail.com>
Date: Sun, 5 May 2013 17:02:18 +0200
Subject: [PATCH] Escape double quotes in URL passed to browse-url

* lisp/org.el (org-link-escape-chars-browser): Add char double quote.
* lisp/org.el (org-open-at-point): Make use of the constant
`org-link-escape-chars-browser'.
* testing/lisp/test-org.el
(test-org/org-link-unescape-ascii-extended-char): Fill paragraph.
(test-org/org-link-escape-url-with-escaped-char): Fill paragraph and
typo.
(test-org/org-link-escape-chars-browser): New test.

This is to make work to open the Org link
[[http://some.host.com/search?q="Org mode"]] in a browser.
2013-05-05 18:12:53 +02:00
Nicolas Goaziou 15a72f6256 Merge branch 'maint' 2013-05-04 09:05:49 +02:00
Nicolas Goaziou 3e1d83bf6b ox: Fix caching for fuzzy link resolution
* lisp/ox.el (org-export-resolve-fuzzy-link): Fix caching process.
* testing/lisp/test-ox.el: Add test.
2013-05-04 09:03:00 +02:00
Nicolas Goaziou dac3af93cf Merge branch 'maint' 2013-04-28 09:41:10 +02:00
Nicolas Goaziou 41bd891d48 org-element: Recognize LaTeX environments with options
* lisp/org-element.el (org-element--current-element): Allow the
  opening string of a LaTeX environment to contain additional
  arguments.
* testing/lisp/test-org-element.el: Add tests.
2013-04-28 09:38:01 +02:00
Eric Schulte 6161bb2c09 Testing support for explicit colnames
* testing/lisp/test-ob.el (test-ob/specific-colnames): This test now
  passes.
2013-04-27 08:59:19 -06:00
Sebastien Vauban bc8b8fbcf0 Test support of explicitly specified colnames
* test-ob.el (test-ob/specific-colnames): Add test checking that given column
names are well present in the output table.
2013-04-27 08:50:09 -06:00
Michael Brand 92f3729857 Allow also "#+NAME: table" for remote references
* lisp/org-table.el (org-table-get-remote-range): Extend regexp to
match "#+NAME: table" additionally to "#+TBLNAME: table".
* testing/lisp/test-org-table.el: Add test.
* testing/org-test.el (org-test-table-target-expect): Allow several
tables to support testing remote references in the last table.
2013-04-26 23:17:48 +02:00
Nicolas Goaziou 75c8be1d8b Fix error when filling a table from an affiliated keyword
* lisp/org.el (org-fill-paragraph): Move to table beginning before
  aligning the table when M-q is called from an affiliated keyword.
* testing/lisp/test-org.el: Add test.
2013-04-26 14:27:38 +02:00
Nicolas Goaziou 5efd7311e8 org-element: Fix interpretation of empty fixed-width elements
* lisp/org-element.el (org-element-fixed-width-interpreter): Fix
  interpretation of fixed-width elements with a nil or empty string
  value.
* testing/lisp/test-org-element.el: Add tests.
2013-04-26 10:38:05 +02:00
Nicolas Goaziou d408d721c3 ox: Fix `org-export-with-footnotes' behaviour
* lisp/ox.el (org-export--skip-p, org-export--interpret-p): When
  `org-export-with-footnotes' is nil, ignore completely footnotes
  references and definitions instead of exporting them verbatim.
* testing/lisp/test-ox.el: Add tests.
2013-04-21 23:44:18 +02:00
Nicolas Goaziou 60aa1682ce ox: Change scope for `org-export-with-timestamps'
* lisp/ox.el (org-export-with-timestamps): Only applies to isolated
  timestamps, i.e. timestamps in a paragraph containing only
  timestamps and empty strings.
(org-export--skip-p): Skip timestamps according to new behaviour.
* testing/lisp/test-ox.el: Update tests.
2013-04-18 16:58:56 +02:00
Michael Brand 45afcf137c Improve doc of empty fields
* doc/org.texi (Formula syntax for Calc): Improve the documentation of
empty fields in formulas for spreadsheet.
* testing/lisp/test-org-table.el: Rename wrongly named functions.
* testing/lisp/test-org-table.el: Use the more obvious "==" instead of
"=" for Calc conditions.
* testing/lisp/test-org-table.el (test-org-table/empty-field): Improve
the examples for vmean with empty fields.
2013-04-14 12:07:48 +02:00
Nicolas Goaziou 659edb40a5 ox: Allow to use empty strings in attributes
* lisp/ox.el (org-export-read-attribute): Allow to use empty strings
  in attributes.
* testing/lisp/test-ox.el: Add tests.

With this patch,

  #+attr_backend: :a "" becomes (:a "")
  #+attr_backend: :a """" becomes (:a "\"\"")
  ...
2013-04-10 18:50:52 +02:00
Michael Brand 5625a6ed79 org-table.el: Fix range len bugs for empty ranges
(org-table-make-reference): A range with only empty fields should lead
to length 0.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.

The range len bugs may lead to wrong calculations for range references
with empty fields when the range len is relevant.  Affects typically
Calc vmean on simple range and without format specifier EN.  Also
Lisp with e. g. `length' on simple range or with L.

It is worth a small compatibility change: For a range with only empty
fields it is now possible and necessary to choose different behaviors
of vmean by adding the format specifiers E and/or N.

This is a follow-up of commit
764315b3fc.
2013-04-09 19:05:20 +02:00
Nicolas Goaziou 5f48315568 ox: Add function returning row number in a table
* lisp/ox.el (org-export-table-row-number): New function.
(org-export-table-cell-address): Use new function.
* testing/lisp/test-ox.el: Add test.
2013-04-09 16:52:41 +02:00
Achim Gratz 220b083091 test-ob-fortran: fix typo
* testing/lisp/test-ob-fortran.el (ob-fortran/preprocessor-var): Fix
  typo, write `preprocessor´ instead of `preprosessor´.
2013-04-07 11:49:37 +02:00
Achim Gratz 02137f0d6f test-ob-fortran: re-enable formerly failing test
* testing/lisp/test-ob-fortran.el (ob-fortran/character-var):
  Uncomment test that formerly failed.

This test seems to be working correctly on Linux and Cygwin.
Re-enable to see if it may not work on other systems and then check
why.
2013-04-07 11:47:48 +02:00
Achim Gratz 3aa78cf4bd test-ob-perl: improve test coverage
testing/lisp/test-ob-perl.el (test-ob-perl/table-passthrough-colnames-nil),
  (test-ob-perl/table-passthrough-colnames-no):
  Make some table entries numbers for better test coverage.
2013-04-07 11:28:57 +02:00
Ippei FURUHASHI 67a55acb39 org-table.el: Fix a bug of leaving the inserted TBLFM line
* org-table.el (org-calc-current-TBLFM): Ensure to remove the
currently inserted TBLFM line, when calling `org-table-recalculate'
returns an error and the processing stops.

* testing/lisp/test-org-table.el: Add test.

When you hit =C-c C-c= at the line of "#+TBLFM: $2=$1*2::$2=$1**2" in

    | 1 |   |
    | 2 |   |
    #+TBLFM: $2=$1*1
    #+TBLFM: $2=$1*2::$2=$1**2

you got:

    | 1 |   |
    | 2 |   |
    #+TBLFM: $2=$1*2::$2=$1**2
    #+TBLFM: $2=$1*1
    #+TBLFM: $2=$1*2::$2=$1**2

with the error message of:

    user-error: Double definition `$2=' in TBLFM line, please fix by hand

In this case, you expected:

    | 1 |   |
    | 2 |   |
    #+TBLFM: $2=$1*1
    #+TBLFM: $2=$1*2::$2=$1**2
2013-04-06 15:15:44 +02:00
Bastien Guerry c0589aa63a Merge branch 'master' of orgmode.org:org-mode 2013-04-05 08:38:07 +02:00
Ippei FURUHASHI 6693456dd7 org-table.el (org-calc-current-TBLFM): Add function
* org-table.el (org-calc-current-TBLFM): New function to
re-calculate the table by applying the #+TBLFM in the line
where the point is.

* org.el (org-ctrl-c-ctrl-c): Call `org-calc-current-TBLFM' when
point is in the #+TBLFM line.

* testing/lisp/test-org-table.el: Add test.
2013-04-05 08:37:51 +02:00
Ippei FURUHASHI c8c17460f1 org-table.el (org-TBLFM-begin): Add function
* org-table.el (org-TBLFM-begin): New defun.
(org-TBLFM-begin-regexp): New variable.

* testing/lisp/test-org-table.el: Add test.
2013-04-05 08:37:51 +02:00
Ippei FURUHASHI a268e33ef0 org.el (org-at-TBLFM-p): Add functon
* org.el (org-at-TBLFM-p): New defun.
(org-TBLFM-regexp): New defconst.

* testing/lisp/test-org-table.el: Add test.
2013-04-05 08:37:51 +02:00
Nicolas Goaziou 479c21336f Remove special behaviour for TARGET keyword
* lisp/org.el (org-store-link, org-link-search, org-options-keywords):
  Remove reference to TARGET keyword.
* lisp/ox.el (org-export-resolve-fuzzy-link, org-export-get-ordinal):
  Do not use TARGET as a destination for links anymore.
* testing/lisp/test-ox.el: Update tests.
* testing/lisp/test-org.el: Update tests.

Its specifications were not useful enough to keep maintaining this
feature.
2013-04-04 20:38:27 +02:00
Eric Schulte 86ce0790a1 change this failing test so that it no longer fails
I see no good way to get the code block name, not sure how we used to do
this, but it is definitely not supported by the current code.
2013-04-03 11:30:14 -06:00
Aaron Ecay 252238a60d Fix testing/lisp/test-ob-emacs-lisp.el
* testing/lisp/test-ob-emacs-lisp.el: Move stray test inside ert-deftest
2013-04-03 09:17:17 -06:00
Nicolas Goaziou 0bd6ccd6f9 ox: Add generic function to retrieve the date of a document
* lisp/ox.el (org-export-date-timestamp-format): New variable.
(org-export-get-date): New function.
* testing/lisp/test-ox.el: Add tests.
2013-04-02 23:55:28 +02:00
Nicolas Goaziou a82b06ae4b org-macro: Properly handle macros in setup files
* lisp/org-macro.el (org-macro--collect-macros): Fix a bug where
  reading a macro in a setup file would remove other macros read so
  far from template.  Change function signature.
(org-macro-initialize-templates): Apply signature change from function
above.
* testing/lisp/test-org-macro.el: Add test.
2013-04-01 15:47:39 +02:00
Nicolas Goaziou 55db57dc0a ox: Properly transfer bound variables through export process
* lisp/ox.el (org-export--list-bound-variables): Renamed from
  `org-export--install-letbind-maybe'.  Though, only return list of
  bound variables instead of installing them as buffer-local
  variables.
(org-export-get-environment): Use new function.  Take care of the
installation of bound variables.
(org-export--generate-copy-script): Make sure non-Org variables are
also installed in buffer copy.
* testing/lisp/test-ox.el: Add test.
2013-04-01 15:20:52 +02:00
Nicolas Goaziou 7736c2d7fb ox: Handle BIND keywords in SETUPFILE files
* lisp/ox.el (org-export-get-environment): Update comment.
(org-export--install-letbind-maybe): Go into SETUPFILE files and
handle BIND keywords there.
* testing/examples/setupfile.org: Update test file.
* testing/lisp/test-ox.el: Add tests.
2013-03-29 21:51:57 +01:00
Nicolas Goaziou a6d9fd82ea ox: White spaces after export snippets are never ignored
* lisp/ox.el (org-export-data): White spaces after export snippets are
  never ignored.
* testing/lisp/test-ox.el: Add test.

Back-end developers should pay attention to the fact that white spaces
before and after an ignored export snippet now are accumulated in the
output.
2013-03-25 20:29:31 +01:00
Bastien Guerry 78959943e2 Merge branch 'master-group-tags2' 2013-03-25 06:59:23 +01:00
Nicolas Goaziou 42e1a6351d org-element: Allow to escape escaping character before a comma
* lisp/org-element.el (org-element-macro-parser): Allow to escape
  escaping character before a comma.  Also do not trim spaces at
  argument boundaries.
* doc/org.texi (Macro replacement): Update documentation about
  possible locations and escaping mechanism.
* testing/lisp/test-org-element.el: Add tests.

With this patch, macro's arguments are read as the following:

  "a,b"     -> '("a" "b")
  "a\,b"    -> '("a,b")
  "a\\,b"   -> '("a\" "b")
  "a\\\,b"  -> '("a\,b")
  "a\\\\,b" -> '(a"\\" "b")

Note that with the patch, you only need to escape backslashes before
a comma:

  "a\\b\,c" -> '("a\\b,c")
2013-03-23 20:42:34 +01:00
Bastien Guerry 2922c1365d testing/lisp/: Use non-obsolete variable names (see previous commit)
* test-org-list.el (test-org-list/cycle-bullet)
(test-org-list/move-item-down, test-org-list/move-item-up)
(test-org-list/insert-item): Use non-obsolete variable names.

* test-org-element.el (test-org-element/at-point): Use
`org-list-empty-line-terminates-plain-lists'.
2013-03-23 17:45:26 +01:00
Bastien Guerry ae85aa0d32 test-ox.el (test-org-export/define-derived-backend, test-org-export/derived-backend-p): Uncomment
* test-ox.el (test-org-export/define-derived-backend)
(test-org-export/derived-backend-p): Uncomment.
2013-03-19 19:39:35 +01:00
Achim Gratz 63c5bc4425 fix test fail introduced by change of default in e8742b78e0
* testing/lisp/test-org-list.el (test-org-list/to-html): Bind
  `org-html-indent´ to nil for testing.
2013-03-18 08:07:26 +01:00
Samuel Loury 0c82deb421 Test the org-open-at-point function.
* testing/examples/open-at-point.org: new file.
* testing/lisp/test-org-open-at-point.el: new file.

This tests only the function when inside or before bracket links
and plain links.
2013-03-16 20:27:00 +01:00
Nicolas Goaziou c66641e1ea Add test related to a5a676e609
* testing/lisp/test-org-element.el: Add test.
2013-03-14 23:11:26 +01:00
Bastien Guerry c5490f0ef0 testing/lisp/text-ox.el: Comment two tests out
These tests fail when run in batch mode:

`test-org-export/define-derived-backend'
`test-org-export/derived-backend-p'

They don't fail when run interactively.
Let's comment them out until we understand
what's wrong with these tests.
2013-03-13 12:55:29 +01:00
Bastien Guerry 9f17654913 testing/: Merge org-test-ob-consts.el into org-test.el 2013-03-13 11:23:56 +01:00
Nicolas Goaziou 59cb22d638 ox: Simplify syntax for attributes
* lisp/ox.el (org-export-read-attribute): Do not use `read' to read
  attributes.  Instead, extract keywords and values from it, which
  means each value will be a string when non-nil.
* contrib/lisp/ox-groff.el (org-groff-link--inline-image): Use new
  attribute syntax.  Small refactoring.
* lisp/ox-ascii.el (org-ascii-horizontal-rule): Use new attribute
  syntax.
* lisp/ox-beamer.el (org-beamer-plain-list): Use new attribute syntax.
* lisp/ox-html.el (org-html--textarea-block): Use new attribute
  syntax.
* lisp/ox-latex.el (org-latex--inline-image, org-latex--org-table,
  org-latex--math-table): Use new attribute syntax.
* lisp/ox-man.el (org-man-table--org-table): Use new attribute syntax.
  Small refactoring.
* lisp/ox-odt.el (org-odt-link--inline-image, org-odt-table-cell): Use
  new attribute syntax.
* testing/lisp/test-ox.el: Add tests.

This patch introduces two changes.  To begin with, it removes the need
for quoting and escaping characters.  Also, all non-nil values are
stored as strings.  As an exception "nil" is stored as nil.
2013-03-11 08:33:10 +01:00
Achim Gratz 37d47a33d9 fix test failure introduced by moving library-of-babel.org in 321f806faf
* testing/lisp/test-ob-lob.el: The file library-of-babel.org has been
  moved from contrib/babel to doc, change the code to track that move.
2013-03-06 21:27:13 +01:00
Nicolas Goaziou 40fc9e869f org-list: Use export back-ends to transform radio lists
* lisp/org-list.el (org-list-send-list): Do not rely on
  `org-list-parse-list'.
(org-list-to-latex, org-list-to-html, org-list-to-texinfo): Use
appropriate export back-end instead of using `org-list-to-generic'.
* testing/lisp/test-org-list.el: Add tests.
2013-03-04 12:33:04 +01:00
Nicolas Goaziou 8f40d7f7a1 ox: Fix export of empty src blocks
* lisp/ox.el (org-export-format-code-default): Handle empty source
  blocks more gracefully.
* lisp/ox-ascii.el (org-ascii-src-block): Handle empty blocks more
  gracefully.
* testing/lisp/test-ox.el: Add tests.
2013-03-03 19:13:43 +01:00
Achim Gratz 2d3addeccf test-ob-perl: add a few perl babel tests
* testing/lisp/test-ob-perl.el: New file with a few tests of the perl
  babel integration.
2013-03-02 22:49:46 +01:00
Achim Gratz 6bc6a361b0 Ensure that new exporter gets tested in batch mode
* testing/org-test.el: Require ox so that these tests will be run
  during batch test.
2013-03-02 18:28:18 +01:00
Nicolas Goaziou 5a0239b9fc ox: Ignore inlinetasks with a :noexport: tag
* lisp/ox.el (org-export--selected-trees): Also mark inlinetasks with
  a select tag.
(org-export--skip-p): Skip inlinetasks with a :noexport: tag.
* testing/lisp/test-ox.el: Add tests.
2013-03-02 15:03:28 +01:00
Nicolas Goaziou 86563e0119 org-element: OPTIONAL_TITLE becomes ALT_TITLE property
* lisp/org-element.el (org-element-headline-parser):
  Rename :optional-title into :alt-title.
* lisp/ox.el (org-export-get-alt-title): Renamed from
  `org-export-get-optional-title'.
* lisp/ox-ascii.el (org-ascii--build-title): Apply name change.
* lisp/ox-html.el (org-html--format-toc-headline): Apply name change.
* lisp/ox-latex.el (org-latex-headline): Apply name change.
* lisp/ox-texinfo.el (org-texinfo--get-node,
  org-texinfo--generate-menu-items): Apply name change.
* testing/lisp/test-ox.el: Update tests.
* doc/org.texi (Table of contents): Update documentation.
2013-02-27 00:03:59 +01:00
Nicolas Goaziou 677433d9b4 ox: Fix bug where properties read from setupfile overwrite previous properties
* lisp/ox.el (org-export--get-inbuffer-options): Remove an optional
  argument.  Rewrite function.  Properties read from a setupfile do
  not overwrite anymore previously computed properties.
(org-export-get-environment): Apply changes to previous function.
* lisp/org.el (org-create-formula--latex-header): Apply arity change
  from `org-export--get-inbuffer-options'.
* testing/lisp/test-ox.el: Add test.
* testing/examples/setupfile.org: New file.
2013-02-26 23:35:36 +01:00
Nicolas Goaziou 367e680582 ox: Change order of retured elements in `org-export-get-previous-element'
* lisp/ox.el (org-export-get-previous-element): Change order of
  retured elements in `org-export-get-previous-element'.
* testing/lisp/test-ox.el: Update test.
2013-02-25 23:17:42 +01:00
Nicolas Goaziou 7cd6fdcd34 org-element: Only allow plain links in links
* lisp/org-element.el (org-element-all-successors): Add `plain-link'
  successor.
(org-element-object-restrictions): Remove `link' within `link'.  Allow
`plain-link' instead.
(org-element-plain-link-successor): New function.
* testing/lisp/test-org-element.el: Add test.

Plain links within links are needed for the following kind of syntax:

  [[http://orgmode.org][file:unicorn.png]]

No other link type is allowed within links.
2013-02-25 22:16:01 +01:00
Nicolas Goaziou 11033a97dc sub/superscript character has to follow a non-blank character
* lisp/org.el (org-match-substring-regexp,
  org-match-substring-with-braces-regexp): Update regexp.
  A sub/superscript cannot start anymore at the beginning of the line
  or after a space.
2013-02-25 21:53:14 +01:00
Nicolas Goaziou 8838585a42 Do not move point when filling a table
* lisp/org.el (org-fill-paragraph): Do not move point when filling
  a table.
* testing/lisp/test-org.el: Add test.
2013-02-25 10:06:58 +01:00
Nicolas Goaziou ca060f7be7 Require 2 blank lines to separate footnote definition
* lisp/org-element.el (org-element-footnote-definition-parser):
  Require 2 blank lines to separate footnote definition.
* lisp/org-footnote.el (org-footnote-at-definition-p): Require 2 blank
  lines to separate footnote definition.
* doc/org.texi: Update documentation for footnotes.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org-footnote.el: Add tests.

Footnote definitions can still be separated with other footnote
definitions and headlines. This change allows to have multiple
paragraphs in a footnote definition without resorting to the "\par"
trick.
2013-02-24 14:44:07 +01:00
Nicolas Goaziou a15a657bfb ox: Better return value for `org-export-get-optional-title'
* lisp/ox.el (org-export-get-optional-title): Return regular title
  when no optional title is found.
* lisp/ox-ascii.el (org-ascii--build-title): Apply change to
  `org-export-get-optional-title'.
* lisp/ox-html.el (org-html--format-toc-headline): Apply change to
  `org-export-get-optional-title'.
* lisp/ox-latex.el (org-latex-headline): Apply change to
  `org-export-get-optional-title'.
* testing/lisp/test-ox.el: Add tests.
2013-02-24 09:20:35 +01:00
Nicolas Goaziou e0e740b289 ox: Add test for :minlevel parameter in INCLUDE keywords
* testing/lisp/test-ox.el (test-org-export/expand-include): Add test.
2013-02-18 20:49:43 +01:00
Nicolas Goaziou a385c6e0e4 org-element: Fix docstring, add tests
* lisp/org-element.el (org-element-headline-parser,
  org-element-inlinetask-parser): Fix docstring.
* testing/lisp/test-org-element.el: Add tests.

This follows ae5932282d.
2013-02-18 08:58:59 +01:00
Nicolas Goaziou 324a2cb3f9 export-back-ends: Apply changes from b692064e621acbc93876670585f8a4b0fd6a7ffa
* lisp/ox-beamer.el (org-beamer--get-label, org-beamer--frame-level,
  org-beamer--format-section, org-beamer--format-frame,
  org-beamer--format-block, org-beamer-headline): Apply changes to
  properties.
* lisp/ox-html.el (org-html-headline, org-html-link,
  org-html-section): Apply changes to properties.
* lisp/ox-icalendar.el (org-icalendar-create-uid,
  org-icalendar-blocked-headline-p, org-icalendar-entry,
  org-icalendar--valarm): Apply changes to properties.
* lisp/ox-odt.el (org-odt-headline): Apply changes
* lisp/ox-publish.el (org-publish-collect-index): Apply changes to
  properties.
* lisp/ox-texinfo.el (org-texinfo--generate-menu-list,
  org-texinfo--generate-menu-items, org-texinfo-template,
  org-texinfo-headline, org-texinfo-link): Apply changes to
  properties.
* lisp/ox.el (org-export-resolve-id-link, org-export-get-category):
  Apply changes to properties.
  (org-export-get-node-property): Update docstring.
* testing/lisp/test-ox.el: Update tests.
2013-02-18 00:12:57 +01:00
Nicolas Goaziou 48da6a46e0 Move macro expansion code into its own library
* lisp/org-macro.el: New file.
* lisp/org.el: Remove macro code.
* lisp/ox.el: Require new library
* testing/lisp/test-org-macro.el: New file.
* testing/lisp/test-org.el: Remove macro test.
2013-02-16 15:55:30 +01:00
Nicolas Goaziou f33d90fb28 ox: Fuzzy link matching ignores statistics cookies
* lisp/ox.el (org-export-resolve-fuzzy-link): Ignore statistics
  cookies when matching an headline.
* testing/lisp/test-ox.el: Add test.
2013-02-16 15:05:45 +01:00
Nicolas Goaziou 2df6ded853 ox: Fix radio link resolution
* lisp/ox.el (org-export-resolve-radio-link): Radio targets are
  case-insensitive.
* testing/lisp/test-ox.el: Add test.
2013-02-15 23:03:29 +01:00
Nicolas Goaziou 78a652716e ox: Whitespaces are not significant when matching a fuzzy link
* lisp/ox.el (org-export-resolve-fuzzy-link): Whitespaces are not
  significant when matching a fuzzy link.
* lisp/org-element.el (org-element-link-parser): Do not remove
  newlines characters in paths anymore, since this is not required.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-ox.el: Add test.
2013-02-15 18:08:03 +01:00
Nicolas Goaziou a8e48bd3a8 Prevent export to file from overwriting current file
* lisp/ox.el (org-export-output-file-name): Add a protection when
  output file name is the same as the original org.
* testing/lisp/test-ox.el: Add tests.
2013-02-15 15:06:01 +01:00
Nicolas Goaziou 39ed70495c ox: Correctly handle footnote section
* lisp/ox.el (org-export--collect-headline-numbering): Remove footnote
  section from TOC.
(org-export-collect-headlines): Do not count footnote section when
numbering a headline.
* testing/lisp/test-ox.el: Add tests.
2013-02-13 16:00:27 +01:00
Nicolas Goaziou 9f8f32c360 org-element: Fix parsing of links with filled path
* lisp/org-element.el (org-element-link-parser): Remove all newline
  characters in path property.
* testing/lisp/test-org-element.el: Add test.
2013-02-13 08:41:43 +01:00
Nicolas Goaziou 1f8c8dc6d6 ox: Implement `inner-template' transcoder
* lisp/ox.el (org-export-as): Call `inner-template' function, if
  available.
* lisp/ox-html.el (org-html-inner-template): New function.
(org-html-template): Move all parts that should be inserted even in
a body-only export into `org-html-inner-template'.
* testing/lisp/test-ox.el: Add tests.
2013-02-11 22:26:52 +01:00
Nicolas Goaziou 94bcc7e282 org-element: Fix parsing of orphaned keyword at the end of an element
* lisp/org-element.el (org-element--current-element): Add a limit
  argument.
(org-element--collect-affiliated-keywords): Fix parsing of orphaned
keyword at the end of an element.
* testing/lisp/test-org-element.el: Add test.
2013-02-11 21:12:43 +01:00
Bastien Guerry 4b0ceee39a test-org.el (test-org/forward-element, test-org/backward-element): Use `regexp-quote'
* test-org.el (test-org/forward-element)
(test-org/backward-element): Use `regexp-quote'.
2013-02-11 17:09:53 +01:00
Nicolas Goaziou 1cac3127c2 Fix tests related to export
* lisp/ob-exp.el (org-babel-exp-process-buffer): Renamed from
  `org-export-blocks-preprocess'.
* lisp/ox.el (org-export-execute-babel-code): Apply previous renaming.
* testing/org-test.el (org-test-at-id): Make sure the function returns
  the value of the last form in its body.
* testing/lisp/test-ob-exp.el: Fix tests.
* testing/lisp/test-ob-lob.el: Fix tests.
2013-02-06 23:06:31 +01:00
Nicolas Goaziou 03a9191dd3 Move previous export framework into contrib
* contrib/lisp/org-ascii.el: New file.
* contrib/lisp/org-beamer.el: New file.
* contrib/lisp/org-docbook.el: New file.
* contrib/lisp/org-exp-blocks.el: New file.
* contrib/lisp/org-exp.el: New file.
* contrib/lisp/org-freemind.el: New file.
* contrib/lisp/org-html.el: New file.
* contrib/lisp/org-icalendar.el: New file.
* contrib/lisp/org-jsinfo.el: New file.
* contrib/lisp/org-latex.el: New file.
* contrib/lisp/org-lparse.el: New file.
* contrib/lisp/org-odt.el: New file.
* contrib/lisp/org-publish.el: New file.
* contrib/lisp/org-special-blocks.el: New file.
* contrib/lisp/org-taskjuggler.el: New file.
* contrib/lisp/org-xoxo.el: New file.
* lisp/org-ascii.el: Removed file.
* lisp/org-beamer.el: Removed file.
* lisp/org-docbook.el: Removed file.
* lisp/org-exp-blocks.el: Removed file.
* lisp/org-exp.el: Removed file.
* lisp/org-freemind.el: Removed file.
* lisp/org-html.el: Removed file.
* lisp/org-icalendar.el: Removed file.
* lisp/org-jsinfo.el: Removed file.
* lisp/org-latex.el: Removed file.
* lisp/org-lparse.el: Removed file.
* lisp/org-odt.el: Removed file.
* lisp/org-publish.el: Removed file.
* lisp/org-special-blocks.el: Removed file.
* lisp/org-taskjuggler.el: Removed file.
* lisp/org-xoxo.el: Removed file.
* testing/lisp/test-org-exp.el: Removed file.
* testing/lisp/test-org-html.el: Removed file.
2013-02-06 23:06:30 +01:00
Nicolas Goaziou 8dd2bfc291 Move new export framework files into core
* contrib/README: Remove references to new export framework.
* contrib/lisp/org-e-ascii.el: Removed file.
* contrib/lisp/org-e-beamer.el: Removed file.
* contrib/lisp/org-e-confluence.el: Removed file.
* contrib/lisp/org-e-groff.el: Removed file.
* contrib/lisp/org-e-html.el: Removed file.
* contrib/lisp/org-e-icalendar.el: Removed file.
* contrib/lisp/org-e-latex.el: Removed file.
* contrib/lisp/org-e-man.el: Removed file.
* contrib/lisp/org-e-odt.el: Removed file.
* contrib/lisp/org-e-publish.el: Removed file.
* contrib/lisp/org-e-texinfo.el: Removed file.
* contrib/lisp/org-export.el: Removed file.
* contrib/lisp/org-koma-letter.el: Removed file.
* contrib/lisp/org-md.el: Removed file.
* contrib/lisp/ox-confluence.el: New file.
* contrib/lisp/ox-groff.el: New file.
* contrib/lisp/ox-koma-letter.el: New file.
* lisp/ox-ascii.el: New file.
* lisp/ox-beamer.el: New file.
* lisp/ox-html.el: New file.
* lisp/ox-icalendar.el: New file.
* lisp/ox-jsinfo.el: New file.
* lisp/ox-latex.el: New file.
* lisp/ox-man.el: New file.
* lisp/ox-md.el: New file.
* lisp/ox-odt.el: New file.
* lisp/ox-publish.el: New file.
* lisp/ox-texinfo.el: New file.
* lisp/ox.el: New file.
* mk/org-fixup.el (org-make-org-loaddefs): Install new export
  framework and back-end files.
* testing/lisp/test-org-export.el: Removed file.
* testing/lisp/test-ox.el: New file.
2013-02-06 23:06:30 +01:00
Nicolas Goaziou 787a07421c Merge branch 'maint' 2013-01-31 22:16:23 +01:00
Nicolas Goaziou 592dc2ee7e org-element: Fix macro parsing with protected commas
* lisp/org-element.el (org-element-macro-parser): Fix error when last
  argument ends with a protected comma.
* testing/lisp/test-org-element.el (test-org-element/macro-parser):
  Add tests.
2013-01-31 22:15:39 +01:00
Nicolas Goaziou ed516e65dc org-export: Fix failing test
* testing/lisp/test-org-export.el: Fix failing test.
2013-01-30 21:32:50 +01:00
Yasushi SHOJI 8e8f40ce2f testing/README: Fix instructions
TINYCHANGE
2013-01-30 17:35:09 +01:00
Nicolas Goaziou 423756dd11 org-export: Generalize fallback footnote definition to all exporters
* contrib/lisp/org-export.el (org-export-get-footnote-definition):
  Provide a fallback definition when none can be found.
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference): Revert
  change made in 30ef385ee0 since it is
  now handled at the export framework level.
* testing/lisp/test-org-export.el: Add test.
2013-01-30 14:22:35 +01:00