* contrib/lisp/org-element.el (org-element-affiliated-keywords):
Remove attributes keywords from the list since they are, de facto,
affiliated keywords.
(org-element-multiple-keywords): Remove "attr" keywords from the list
since they always belong to that list.
(org-element--affiliated-re, org-element-collect-affiliated-keywords,
org-element-interpret--affiliated-keywords): Handle special attr
keywords correctly.
* contrib/lisp/org-export.el (org-export-get-global-options): Parse
default value from parsed keywords, too.
* testing/lisp/test-org-export.el: Change test accordingly.
* contrib/lisp/org-e-latex.el (org-e-latex--delayed-footnotes-definitions):
New function.
(org-e-latex-footnote-reference, org-e-latex-item): Use new function.
* contrib/lisp/org-e-latex.el (org-e-latex-headline): Allow curly
brackets and replace square brackets with parenthesis in table of
contents when tags are removed.
* contrib/lisp/org-export.el (org-export-get-subtree-options): Make
sure point is at an headline and buffer isn't narrowed before
looking for EXPORT_TITLE property.
* testing/lisp/test-org-export.el: Add test.
* contrib/lisp/org-e-latex.el (org-e-latex-babel-language-alist): New
variable.
(org-e-latex--guess-babel-language): New function.
(org-e-latex-template): Set babel language according to LANGUAGE keyword.
* contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width): Pay
attention to length of check-box, if any when computing text width.
(org-e-ascii--checkbox): New function.
(org-e-ascii-item): Allow check-boxes in description lists.
(org-e-ascii-paragraph): Refactor code.
* contrib/lisp/org-e-html.el (org-e-html-format-list-item): Allow
check-boxes in description lists.
* contrib/lisp/org-e-latex.el (org-e-latex-item): Allow check-boxes in
description lists.
* contrib/lisp/org-e-odt.el (org-e-odt--checkbox): New function.
(org-e-odt-item): Allow check-boxes in description lists.
(org-e-odt-paragraph): Do not add checkbox in front of paragraph if it
belongs to a description item, since the box will be attached to the
tag.
* contrib/lisp/org-element.el (org-element-parse-buffer): Correctly
set original parent.
(org-element-parse-elements, org-element-parse-objects): Set `:parent'
property of each element/object.
* testing/lisp/test-org-element.el: Add tests.
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
Retrieve footnote definitions and id in buffer.
(org-export-store-footnote-definitions): Removed function.
(org-export-collect-tree-properties): Update docstring.
(org-export-as): Do not call `org-export-store-footnote-definitions'.
(org-export-resolve-id-link): Return external file name when there's
no match for id in current parse tree.
* contrib/lisp/org-e-latex.el (org-e-latex-link): Handle external id
links.
* testing/lisp/test-org-export.el: Add tests.
If headline is linked via customid in Org file, use customid in HTML
export as well. Additionally, while linking to headline from within a
TOC section, use customid preferentially in HTML export.
* contrib/lisp/org-export.el (org-export-dispatch): Move requires into
dispatcher.
This is a temporary change, until interactive functions in back-ends
can be properly autoloaded.
* contrib/lisp/org-export.el (org-export-get-tags): New function.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title): Use new function.
* contrib/lisp/org-e-html.el (org-e-html-format-headline--wrap,
org-e-html-headline): Use new function.
* contrib/lisp/org-e-latex.el (org-e-latex-headline,
org-e-latex-inlinetask): Use new function.
* contrib/lisp/org-e-odt.el (org-e-odt-format-headline--wrap): Use new
function.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-export.el (org-export-populate-ignore-list): Fix
docstring.
(org-export--selected-trees): Correctly search for headlines with
a select tag.
(org-export--skip-p): Fix selective export when a select tag is
present in the buffer.
* testing/lisp/test-org-export.el: Update tests.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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>>
* contrib/lisp/org-export.el (org-export-with-timestamps): Allow to
keep only active timestamps or inactive ones with respectively
`active' and `inactive' values.
(org-export--skip-p): Update tests to determine if a timestamp should
be ignored.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-element.el: Fix some comments.
* contrib/lisp/org-element.el (org-element-babel-call-parser): Fix
property name.
(org-element-babel-call-interpreter, org-element--element-block-re):
Fix docstring.
(org-element-clock-parser, org-element-clock-interpreter,
org-element-planning-parser, org-element-planning-interpreter): New
functions.
(org-element-time-stamp-parser): Move planning keywords out of the
object: no more `:appt-type' property
(org-element-time-stamp-interpreter,
org-element-time-stamp-successor): Apply changes to previous function.
(org-element-paragraph-separate): Time keywords also end paragraphs.
(org-element-all-elements): Register new elements types.
(org-element-current-element): Recognize new elements.
(org-element-parse-elements): Fix comments.
* testing/lisp/test-org-element.el: Add tests.
* 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-dynamic-block,
org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link,
org-e-ascii-quote-section, org-e-ascii--table-cell-width): Do not
provide back-end symbol.
* contrib/lisp/org-e-html.el (org-e-html--caption/label-string,
org-e-html-footnote-section, org-e-html-template,
org-e-html-dynamic-block, org-e-html-format-headline--wrap,
org-e-html-headline, org-e-html-item, org-e-html-link,
org-e-html-time-stamp): Do not provide back-end symbol.
* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string,
org-e-latex-template, org-e-latex-dynamic-block,
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): Do not provide back-end symbol.
* contrib/lisp/org-e-odt.el (org-e-odt-format-preamble,
org-e-odt-format-label, org-e-odt-write-manifest-file,
org-e-odt--caption/label-string, org-e-odt-dynamic-block,
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,
org-e-odt-time-stamp): Do not provide back-end symbol.
* contrib/lisp/org-export.el (org-export-get-environment): Provide
back-end symbol under `:back-end' property.
(org-export-collect-tree-properties, org-export-data,
org-export-filter-verbatim-functions, org-export-install-filters,
org-export-as, org-export-expand-macro,
org-export-filter-apply-functions, org-export-secondary-string):
Remove back-end references.
* testing/lisp/test-org-export.el: Update tests.
Back-end can be found in communication channel with (plist-get
info :back-end). Hence back-ends do not have to hard-code their name
in any transcoder. It will allow to derive a back-end from another
one.
* contrib/lisp/org-element.el (org-element-inlinetask-interpreter,
org-element-headline-interpreter): Fix headline/inlinetask
interpretation.
(org-element-inlinetask-interpreter): Prefer degenerate inlinetasks
when they have no contents.
* contrib/lisp/org-export.el (org-export-creator-string):
Check for `org-version' being bound before using it.
(org-export-get-inbuffer-options): Use
`org-element-restriction'.
* contrib/lisp/org-element.el (org-element-table-parser): Split tables
into table-row elements and table-cell objects.
(org-element-table-interpreter): Adapt interpreter to new code.
(org-element-table-row-parser, org-element-table-row-interpreter,
org-element-table-cell-parser, org-element-table-cell-interpreter,
org-element-table-cell-successor, org-element-table-row-successor,
org-element-restriction): New functions.
(org-element-headline-parser,
org-element-inlinetask-parser, org-element-item-parser,
org-element-verse-block-parser,
org-element-footnote-reference-parser,
org-element-collect-affiliated-keywords, org-element-parse-objects):
Use new function
(org-element-all-objects): Add new objects.
(org-element-target-parser): Small change to docstring.
(org-element-object-restrictions): Merge `org-element-string-restrictions'
into it.
(org-element-string-restrictions): Remove variable.
(org-element-parse-elements): Parse objects in non-recursive elements
with contents.
(org-element-normalize-string): Small refactoring.
(org-element-at-point): Handle table navigation.
* testing/lisp/test-org-element.el: Add tests.