Commit Graph

265 Commits

Author SHA1 Message Date
Rasmus 130dcdb0cb ox.el: Infer :minlevel for INCLUDE-keywords
* ox.el (org-export-expand-include-keyword): Infer :minlevel for
included Org documents if not set explicitly.
* test-ox.el (org-export-expand-include-keyword): Add tests for inferred :minlevel.
2014-12-24 12:44:51 +01:00
rasmus 7509d6d721 ox.el: Fix footnote-bug in #+INCLUDE-keyword
* ox.el (org-export--prepare-file-contents): Preserve footnotes
when using the LINES argument.  New optional argument FOOTNOTES.
 (org-export-expand-include-keyword): New optional argument
 FOOTNOTES.
* test-ox.el (test-org-export/expand-include): Add test for INCLUDE
  with :lines and footnotes.
2014-12-24 11:58:50 +01:00
Nicolas Goaziou 61ba40c371 ox: Deprecate `org-export-get-genealogy' for `org-element-lineage'
* lisp/ox.el (org-export-collect-tree-properties,
  org-export-numbered-headline-p, org-export-get-tags,
  org-export-resolve-fuzzy-link, org-export-get-ordinal,
  org-export-get-parent-headline, org-export-get-parent-element,
  org-export-get-parent-table):

* lisp/ox-ascii.el (org-ascii--current-text-width):

* lisp/ox-beamer.el (org-beamer--frame-level):

* lisp/ox-icalendar.el (org-icalendar-blocked-headline-p):

* lisp/ox-latex.el (org-latex-footnote-reference):

* lisp/ox-odt.el (org-odt--enumerate, org-odt-link--infer-description,
  org-odt-table): Use `org-element-lineage' instead of
  `org-export-get-genealogy'.
2014-11-16 13:30:33 +01:00
Nicolas Goaziou a2f8a48ab5 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2014-11-07 00:16:42 +01:00
Leslie H. Watter d4a4fc740e ox.el: Add pt_BR translations to export engine
* lisp/ox.el: (org-export-dictionary) Add pt_BR messages to the list.

TINYCHANGE
2014-11-06 23:47:28 +01:00
Nicolas Goaziou 1c34ec85b0 ox: Update INCLUDE keywords wrt property drawers
* lisp/ox.el (org-export--inclusion-absolute-lines): Fix comment.
(org-export--prepare-file-contents):  Do not look for property drawers
after a drawer, since this is impossible.

* testing/examples/include.org: Fix test data.
2014-10-28 14:23:52 +01:00
Nicolas Goaziou d849804ac7 ox: Remove unnecessary code comments 2014-10-24 21:13:47 +02:00
Nicolas Goaziou 89f5ad36d7 Merge branch 'maint' 2014-10-12 22:55:38 +02:00
Nicolas Goaziou a0ac1344fc ox: Fix 88457acff4
* lisp/ox.el (org-export-async-start): Limit first argument to lambda
  expressions.
* lisp/ox-publish.el (org-publish, org-publish-all,
  org-publish-current-file): Replace `ignore', per limit stated above.

Due to a hack allowing to provide quasi-quoted lambda expressions,
symbols are not allowed as result handler.  This limitation is not
much of a problem as `org-export-async-start' is only meant to be used
internally.
2014-10-12 22:53:01 +02:00
Aaron Ecay bc9a582f1e [export] Raise an error if footnote definition is not found.
* lisp/ox.el (org-export-get-footnote-definition): Raise an error if
footnote definition is not found.
2014-10-12 16:47:09 +01:00
Aaron Ecay 5f423f1208 Warn about unexpanded macros on export
* lisp/org-macro.el (org-macro-replace-all): Add optional `finalize'
argument.
* lisp/ox.el (org-export-as): Use it.
2014-10-12 16:47:09 +01:00
Nicolas Goaziou fac4677e51 Merge branch 'maint' 2014-10-10 11:11:06 +02:00
Nicolas Goaziou 88457acff4 ox: Fix "void-variable ignore" error when publishing
* lisp/ox.el (org-export-async-start): Allow to use symbols as
  function.

Thanks to Julien Cubizolles for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/91532
2014-10-10 11:05:06 +02:00
Rasmus 464cd965cb ox: Support unnumbered headlines via property
* ox.el (org-export--collect-headline-numbering): Ignore unnumbered headline.
(org-export-get-headline-id,
org-export--collect-unnumbered-headline-id): New functions.
(org-export-numbered-headline-p): Further tests for unnumbered headline.
* ox-odt.el (org-odt-headline, org-odt-link,
org-odt-link--infer-description)
ox-md.el (org-md-headline, org-md-link),
ox-latex.el (org-latex-headline, org.latex-link),
ox-html.el (org-html-headline, org-html-link),
ox-ascii.el (org-ascii-link): Support unnumbered headlines.
* test-ox.el (test-org-export/org-export-get-headline-id): New test.
* OrgOdtStyles.xml: Add styles for unnumbered headings.
2014-10-03 22:06:34 +02:00
Rasmus 986037a538 ox: Allow file-links with #+INCLUDE-keyword
* org.el (org-edit-special): Handle file-links for INCLUDE.
* ox.el (org-export--prepare-file-contents): Handle links and
add option no-heading.
* ox.el (org-export-expand-include-keyword): Resolve headline
links and add option :only-contents.
* orgguide.texi (Include files)
org.texi (Include files): Updated.
* testing/examples/include.org: New examples.
* test-ox.el (test-org-export/expand-include): New tests.
2014-10-02 18:51:37 +02:00
Nicolas Goaziou 39f5f03946 ox: Resurrect :input-buffer property
* lisp/ox.el (org-export--get-buffer-attributes):
  Resurrect :input-buffer property.

This property was removed in 604b9389. since it wasn't necessary
anymore internally.  It is back again as a consequence of a user
request.
http://permalink.gmane.org/gmane.emacs.orgmode/91230
2014-09-28 23:29:59 +02:00
Nicolas Goaziou 45a00a4d82 Merge branch 'maint' 2014-09-26 11:11:34 +02:00
Kyle Meyer 4f81b8cac0 ox.el: Fix typo in documentation
* lisp/ox.el (org-export-show-temporary-export-buffer): Fix typo.

TINYCHANGE
2014-09-26 11:11:02 +02:00
Nicolas Goaziou b5c9de618e Merge branch 'maint' 2014-09-08 12:10:28 +02:00
Nicolas Goaziou 7c48bdd7a8 Revert "ox: Implement predicate for export blocks"
This reverts commit 2160b3d242.
2014-09-08 12:09:52 +02:00
Nicolas Goaziou e3369c07f0 Revert "Merge export and special blocks within back-ends"
This reverts commit fbc7097ffa.

Conflicts:
	lisp/ox-texinfo.el
2014-09-08 11:57:27 +02:00
Nicolas Goaziou c235bd83d2 ox: Implement body filter
* lisp/ox.el (org-export-filters-alist): Add body filter.
(org-export-filter-body-functions): New variable.
(org-export-as): Call body filter.

* doc/org.texi (Advanced configuration):
* etc/ORG-NEWS (argument): Document new filter.
2014-09-06 10:28:38 +02:00
Nicolas Goaziou d47f66d6d0 ox: Implement `org-export-table-row-in-header-p'
* lisp/ox.el (org-export-table-row-in-header-p): New function.
(org-export-table-row-starts-header-p,
org-export-table-row-ends-header-p): Use new function.

* testing/lisp/test-ox.el (test-org-export/table-row-in-header-p): New
  test.
2014-08-26 15:05:52 +02:00
Nicolas Goaziou 81906c52ae ox: Extend first and last sibling predicates to all elements
* lisp/ox.el (org-export-first-sibling-p, org-export-first-sibling-p):
  Extend to all elements and objects.

* testing/lisp/test-ox.el (test-org-export/first-sibling-p,
  test-org-export/last-sibling-p): Add tests.

* etc/ORG-NEWS: Document change.
2014-08-26 14:48:05 +02:00
Nicolas Goaziou b1406dcddb Merge branch 'maint'
Conflicts:
	doc/org.texi
	lisp/ox-texinfo.el
2014-08-08 22:07:45 +02:00
Nicolas Goaziou 9f9aa52f14 ox: Provide output file name, if any, to back-ends
* lisp/ox.el (org-export-to-file): Provide output file name in
  communication channel, through :output-file property.

This change is needed to fix back-ends needing this information during
the process, e.g., `texinfo'.
2014-08-07 00:00:19 +02:00
Nicolas Goaziou 604b93892c ox: Title fallbacks to nil instead of file name
* lisp/ox.el (org-export--get-inbuffer-options):
(org-export-as): Remove title default value handling.
(org-export--get-buffer-attributes): Remove unnecessary property.

* doc/org.texi (Document title):
(Export settings):
* doc/orgguide.texi (Export options): Update documentation.

* testing/lisp/test-ox.el (test-org-export/set-title): Update tests
  according to new specifications.
2014-08-02 21:14:22 +02:00
Nicolas Richard 350fdfd676 ox: Signal an error if keyword is unknown while defining backends
* lisp/ox.el (org-export-define-backend):
(org-export-define-derived-backend): Signal an error if keyword is
unknown.
2014-07-31 12:22:00 +02:00
Nicolas Goaziou bc43228e6d Remove `export-block' syntax type
* lisp/org-element.el (org-element-all-elements): Remove
  `export-block' type.
(org-element-block-name-alist): Make it a defconst since it is not
meant to be changed anymore.
(org-element-export-block-parser,
org-element-export-block-interpreter): Remove functions.

* lisp/ox.el (org-export-filters-alist): Remove export block filter.
(org-export-register-backend): Do not alter
`org-export-block-name-alist' anymore.
(org-export-define-backend, org-export-define-derived-backend): Update
docstring.
(org-export-filter-export-block-functions): Remove variable.

* testing/lisp/test-org-element.el (test-org-element/export-block-parser,
  test-org-element/export-block-interpreter): Remove tests.

* testing/lisp/test-ox.el (test-org-export/define-backend): Update test.
2014-07-27 14:29:21 +02:00
Nicolas Goaziou b77a026a24 Merge branch 'maint' 2014-07-27 14:28:53 +02:00
Nicolas Goaziou 2160b3d242 ox: Implement predicate for export blocks
* lisp/ox.el (org-export-raw-special-block-p): New function.

* testing/lisp/test-ox.el (test-org-export/raw-special-block-p): New
  test.

This patch is a forward-compatibility measure since the function is
mandatory for export back-ends in Org 8.3. It makes it easier for
back-end maintainers to provide a back-end compatible with both Org
8.2 and 8.3.
2014-07-27 14:25:44 +02:00
Nicolas Goaziou 8d0f7340ed ox: Fix inline footnote definitions
* lisp/ox.el (org-export-collect-tree-properties): Make sure changes
  to the parse tree propagate to the value of
  `org-export-get-footnote-definition'.

Thanks to Florian Beck for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88419
2014-07-16 16:11:52 +02:00
Nicolas Goaziou ca6ecf9e49 org-element: Remove :inline-definition from inline footnotes
* lisp/org-element.el (org-element-recursive-objects): Add
  `footnote-reference'.
(org-element-secondary-value-alist): Remove reference to
`footnote-reference'.
(org-element-footnote-reference-parser): Definition for inline
references is stored as the contents of the reference, not in
a secondary string.
(org-element-footnote-reference-interpreter): Apply changes from
parser.

* lisp/ox.el (org-export-get-footnote-definition,
  org-export-get-environment): Apply changes from parser.

* testing/lisp/test-org-element.el (test-org-element/footnote-reference-parser):
  Update test.
(test-org-element/context): Add test.

Storing definition in a secondary string was a poor design choice as
there is no "primary" string anyway.  This also prevents
`org-element-context' from finding objects within the inline
definition.
2014-07-06 11:24:12 +02:00
Nicolas Goaziou 8b959237fc ox: Small refactoring
* lisp/ox.el (org-export-get-category): Refactor code.
2014-06-18 23:30:54 +02:00
Achim Gratz 4ed554196b ox: implement additional #+INCLUDE markup
* lisp/ox.el (org-export-expand-include-keyword): Change parsing so
  that arbitrary blocks around the included content can be used.
  Content is not code-escaped unless it is a literal block, this
  applies to "src" and "example".
* doc/org.texi (Include files): Document the additional markup.
* testing/lisp/test-ox.el (test-org-export/expand-include): Add test
  for an #+INCLUDE with "html" and "center" markup.
* testing/examples/include.html: New file, used for testing
  "#+INCLUDE html".
2014-06-07 18:02:52 +02:00
Nicolas Goaziou 38ac0d8b56 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2014-06-03 22:13:31 +02:00
Nicolas Goaziou 0fbc4893ed ox: Fix priority bug in :title property
* lisp/ox.el (org-export--get-inbuffer-options): Return the empty
  string instead of nil when TITLE keywords has no value.
(org-export--get-buffer-attributes): Do not set :title property
early.
(org-export--get-global-options): Do not ignore anymore nil values.
Small refactoring.
(org-export-as): Correctly set :title here.

Thanks to Nicolas Richard for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87149
2014-06-03 22:07:35 +02:00
Achim Gratz 5bf928bae7 Merge branch 'maint'
Conflicts:
	lisp/ob-core.el
	lisp/org.el
	lisp/ox.el
2014-05-28 16:23:08 +02:00
Achim Gratz 6c1b41bd68 org, ox: move defsubst before first use
* lisp/ox.el (org-export-get-parent): Move definition of
  'org-export-get-parent' before first use.  Leave comment at original
  place of definition.

* lisp/org.el (org-uniquify): Move definition of 'org-uniquify' before
  first use.  Leave comment at original place of definition.
2014-05-28 13:44:53 +02:00
Nicolas Goaziou 089a13b2f3 Merge branch 'maint' 2014-05-12 22:21:33 +02:00
Nicolas Goaziou e242bc5180 ox: Fix Wrong type argument error with empty footnotes
* lisp/ox.el (org-export-data): Always return a string, as specified
  by the docstring.

Thanks to kuanyui for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86183
2014-05-12 22:18:00 +02:00
Nicolas Goaziou 3034f2895a ox: Fix bug when expanding include keywords
* lisp/ox.el (org-export--prepare-file-contents): Do not find
  footnotes in non-Org files.

Thanks to Kyle Meyer for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/85677
2014-04-30 09:31:18 +02:00
Bastien Guerry 91da1b4c76 ox.el (org-export-time-stamp-file): Fix docstring typo
* ox.el (org-export-time-stamp-file): Fix docstring typo.
2014-04-22 17:39:01 +02:00
Nicolas Goaziou 4c0a29edec Merge branch 'maint'
Conflicts:
	lisp/ox.el
2014-04-21 09:50:10 +02:00
Nicolas Goaziou b983048b73 Small documentation improvements
* doc/org.texi (The Export Dispatcher): Reformulation.
* lisp/ox.el (org-export-copy-to-kill-ring): Comply to docstrings
  standards.
2014-04-21 09:48:17 +02:00
Bastien Guerry 4b10434801 Fix previous commit 2014-04-20 12:03:50 +02:00
Julian Gehring 03ea610b7e ox.el: German localization of 'References' section
* lisp/ox.el: Add German localization of the 'References' section

Suggested by Batien Guerry
2014-04-20 11:36:58 +02:00
Bastien Guerry 07a501c84a Fix commit 53aab23e70
Thanks to Nicolas for spotting this.
2014-04-17 18:22:53 +02:00
Nicolas Goaziou 56483ad173 Small fix
* contrib/lisp/ox-bibtex.el (org-bibtex-process-bib-files,
org-bibtex-process-bib-files): Use correct encoding.

* lisp/ox.el (org-export-dictionary): Update "Reference" entry.
2014-04-17 17:41:09 +02:00
Bastien Guerry 860912c6d0 ox.el (org-export-dictionary): Add "References"
* ox.el (org-export-dictionary): Add "References".

* contrib/lisp/ox-bibtex.el (org-bibtex-process-bib-files):
Translate "References" according to the export language.

Thanks to Julian Gehring for suggesting this.
2014-04-17 17:25:03 +02:00