* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string,
org-e-latex--wrap-label, org-e-latex-latex-environment):
Consistently call `org-export-solidify-link-text' so references can
match labels.
* contrib/lisp/org-e-latex.el: new customizable org-e-latex-known-errors
is an alist of possible errors, taken from org-e-latex--collect-errors
* contrib/lisp/org-e-latex.el (org-e-latex--collect-errors):
More concise code.
The previous explicit search for errors is replaced by an iteration
over the alist org-e-latex-known-errors.
* contrib/lisp/org-export.el (org-export-dispatch-ui): Do not use same
buffer name as previous export dispatcher. Also make sure the
temporary buffer is deleted once the export is done.
Handle enumeration more robustly. Numbered OpenDocument formula no
longer uses a table for typesetting of formula and it's number.
Also some renaming and moving around.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-caption,
org-e-ascii--list-listings, org-e-ascii--list-tables): Use new
caption tool.
* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string): New
signature. Use new caption tool.
(org-e-latex-link--inline-image, org-e-latex-src-block,
org-e-latex-table--org-table): Apply signature change.
* contrib/lisp/org-md.el (org-md-link): Use new caption tool.
* contrib/lisp/org-e-latex.el (org-e-latex-toc-command): New variable.
(org-e-latex-template): Use new variable.
Thanks to Thomas S. Dye for providing the patch.
* contrib/lisp/org-e-ascii.el: Add an entry for `org-export-dispatch'.
* contrib/lisp/org-e-beamer.el: Add an entry for `org-export-dispatch'.
* contrib/lisp/org-e-groff.el (e-groff): Use
`org-export-define-backend'. Add an entry for `org-export-dispatch'.
* contrib/lisp/org-e-html.el: Add an entry for `org-export-dispatch'.
* contrib/lisp/org-e-latex.el: Add an entry for `org-export-dispatch'.
* contrib/lisp/org-e-man.el: Use `org-export-define-backend'. Add an
entry for `org-export-dispatch'.
* contrib/lisp/org-e-odt.el: Add an entry for `org-export-dispatch'.
* contrib/lisp/org-e-texinfo.el: Use `org-export-define-backend'. Add an
entry for `org-export-dispatch'.
* contrib/lisp/org-md.el: Add an entry for `org-export-dispatch'.
* contrib/lisp/org-export.el (org-export-define-backend):
Add :menu-entry keyword.
(org-export-define-derived-backend): Add :menu-entry
and :sub-menu-entry keywords.
(org-export-dispatch-menu-entries): New variable.
(org-export-dispatch): Define a new interface.
(org-export-dispatch-ui): Rewrite function.
(org-export-dispatch-action): New function.
Every back-end defined through `org-export-define-backend' or
`org-export-define-derived-backend' can specify a menu entry for
`org-export-dispatch'. Navigating the menu is now a two levels
process.
* contrib/lisp/org-e-odt.el (org-e-odt--translate-description-lists):
This is a developer filter, which should be handled by
`org-export-define-backend'. Also, such filters do not require
a back-end check.
`org-export-*-functions' are user-oriented variables.
* contrib/lisp/org-e-beamer.el (org-e-beamer-environments-special):
Make "againframe" an hard-coded environment.
(org-e-beamer-headline): Handle "againframe" environment.
(org-e-beamer-select-environment): Provide support for "againframe"
environments.
A list marked with non-nil `:list-table' attribute will be deemed as a
list-table. A typical list-table will look like this:
,----
| #+attr_odt :list-table t
| - Row 1
| - 1.1
| - 1.2
| - 1.3
| - Row 2
| - 2.1
| - 2.2
| - 2.3
`----
Also fix regression in indented table caused by recent `section'
changes.
* org-e-groff.el
(org-e-groff-inline-image-rules): Added PNG and JPG as valid
inline suffixes.
(org-e-groff-raster-to-ps): Variable that contains the command
to execute raster to eps conversion.
(org-e-groff--letter-head): Updated logic to handle empty
FROM/TO in letter classes.
(org-e-groff-link--inline-image): Added logic to process
raster images.
* contrib/lisp/org-export.el (org-export--get-inbuffer-options): Allow
in-buffer keywords at any column.
`org-make-options-regexp' enforces keywords at column 0. This is an
unnecessary restriction, as we can imagine the following Org buffer:
* Export Setup :noexport:
#+AUTHOR: Me
#+DATE: 29/03/2012
* Headline 1
...
* contrib/lisp/org-export.el (org-export--install-letbind-maybe): If
a variable is bound two times in the buffer, be sure to set its
value to the last bound. Use correct function to confirm binding.
Allow keyword to start on any column.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-export.el (org-export-define-backend): Update
docstring.
(org-export-special-keywords): Remove "MACRO".
(org-export--get-inbuffer-options, org-export--get-buffer-attributes):
Remove internal macro handling.
(org-export-as): Use external tool instead.
(org-export-expand-macro): Remove function.
* contrib/lisp/org-e-ascii.el (org-e-ascii-macro): Remove function.
* contrib/lisp/org-e-groff.el (org-e-groff-macro): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-macro): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-macro): Remove function.
* contrib/lisp/org-e-man.el (org-e-man-macro): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-macro): Remove function.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-macro): Remove
function.
* testing/lisp/test-org-export.el: Remove tests.
Since macros are now expanded before parsing (and produce Org syntax),
back-ends will never see them (unless NO-EXPAND argument from
`org-export-as' is non-nil, which isn't the case for any back-end so
far).
* contrib/lisp/org-e-beamer.el (org-e-beamer-template): Allow
inserting class option when there was none.
* contrib/lisp/org-e-latex.el (org-e-latex-template): Allow inserting
class option when there was none.
Thanks to Fabrice Popineau for suggesting this.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-table-row): Check if the row is part of the first row group. If it is treat it as @headitem rather than a normal @item.
* contrib/lisp/org-e-html.el (org-e-html-special-block): convert LaTeX
markup to HTML
This function had not been modified from its org-e-latex-special-block original
so with #+BEGIN_ORG for example you would get \begin{org}...\end{org}
in the output instead of <div class="org">...</div>.
TINYCHANGE
* contrib/lisp/org-export.el (org-export-with-statistics-cookies): New
variable.
(org-export-options-alist): Use new variable.
(org-export--skip-p): Handle new option.
* testing/lisp/test-org-export.el: Add test.
1. Use element translation for description lists.
2. Handle low-level headlines.
3. Handle tables within listified headlines.
Some crude changes for creating references to a list item.
Also other misc changes.
* contrib/lisp/org-export.el (org-export-dictionary): Flesh out
dictionary.
(org-export-translate): Allow for a :default charset in order to
simplify dictionary completion.
* lisp/org-element.el (org-element-link-type-is-file): New variable.
(org-element-link-parser): Extract search option and application in
"file"-type links.
* contrib/lisp/org-e-html.el (org-e-html-link): Remove components
extraction since this in now done in `org-element-link-parser'.
* contrib/lisp/org-e-odt.el: Remove components extraction since this
in now done in `org-element-link-parser'.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-link): Remove
components extraction since this in now done in
`org-element-link-parser'.
* contrib/lisp/org-e-latex.el (org-e-latex-link): Remove components
extraction since this in now done in `org-element-link-parser'.
* contrib/lisp/org-e-man.el (org-e-man-link): Remove components
extraction since this in now done in `org-element-link-parser'.
* contrib/lisp/org-e-groff.el (org-e-groff-link): Remove components
extraction since this in now done in `org-element-link-parser'.
* contrib/lisp/org-md.el (org-md-link): Remove components extraction
since this in now done in `org-element-link-parser'.
* testing/lisp/test-org-element.el: Add tests.
* contrib/lisp/org-export.el (org-export-filter-apply-functions): Nil
value from a filter means filter will be skipped. To ignore the
current element or object, the filter has to return the empty string
instead.
This change is done to ease filter writing. When writing
a backend-specific filter (and I guess most are), there's no more need
for the somewhat contrived:
(if (not (eq backend 'e-latex)) data
... filter's job...)
A more straightforward:
(when (eq backend 'e-latex)
... filter's job...)
is now enough.
On the other hand, it is not possible anymore to specify 'ignore as
a filter to ignore every element or object of a given type. To
achieve that goal, one can now write, for example:
(add-to-list 'org-export-filter-example-block-functions
(lambda (value backend info)
(when (eq backend 'e-html) "")))
It will ignore every example block in the `e-html' export back-end.
* contrib/lisp/org-export.el (org-export-collect-headlines): By
default, limit depth of headline collection to last headline level.
* contrib/lisp/org-e-html.el (org-e-html-toc): Small refactoring.
* contrib/lisp/org-e-html.el (org-e-html-toc): Accept non numeric
values for depth.
(org-e-html-template): Call previous function even when depth isn't
a number.
(org-e-html-keyword): Call previous function even when depth isn't
a number. Also react on #+HTML keywords, not #+LATEX.
and remove invalid characters from menu items
* contrib/lisp/org-e-texinfo.el (org-e-texinfo--sanitize-menu): Remove
invalid characters from menu entries and nodes.
(org-e-texinfo--sanitize-contents): Ensure @ { and } are properly
escaped in text and headlines.
(org-e-texinfo--generate-menu-items): Strip invalid characters from
menu titles.
(org-e-texinfo-fixed-width): Escape @ { and } in fixed-width
environments.
(org-e-texinfo-headline): Ensure nodes do not have invalid characters
and escape @ { and } in section titles.
(org-e-texinfo-plain-text): Use proper escape character for @ { and }.
exporting to ensure info can process them properly
* contrib/lisp/org-e-texinfo.el (org-e-texinfo--generate-menu-items):
Use org-e-texinfo--sanitize-headline to ensure markup is stripped
before being used for sectioning and menu information. Nodes and
menus can fail because of formatting and section titles do not show
any formatting when viewed in an info-viewer.
(org-e-texinfo--sanitize-headline): Wrapper function for
org-e-texinfo--sanitize-healine-contents
(org-e-texinfo--sanitize-headline-contents): Strips markup from
headlines. It treats content recursively to ensure nested formatting
is removed as well.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo--generate-detailed): Do
not run if there are no headlines in the file.
(org-e-texinfo-template): Generate menu and detailed menu in initial
let form. Only insert them if non-empty.
(org-e-texinfo-headline): Ensure that %'s are properly escaped in
@node's to prevent parse errors.
(org-e-texinfo-make-menu): Do not insert "detailed" if menu is empty,
return empty entry instead.
Thanks to Bastien for reporting the failures with headline-less files
and simple "%" in the headline.
* org-notmuch.el (org-notmuch-store-link)
(org-notmuch-search-store-link): Use `concat' instead of
`org-make-link'.
* org-git-link.el (org-git-create-git-link)
(org-git-insert-link-interactively): Ditto.
* org-bookmark.el (org-bookmark-store-link): Ditto.
Thanks to Friedrich Delgado for reporting this.
* contrib/lisp/org-e-texinfo.el: Provide the ability to generate .texinfo and .info files from an Org-Mode file.
Export can be called using either (org-e-texinfo-export-to-texinfo) to generate a .texinfo file, or (org-e-texinfo-export-to-info) to additionally compile the .texinfo file into a .info file.
* contrib/lisp/org-e-beamer.el (org-e-beamer--format-frame): In
a fragile frame, append a white space to contents in order to
prevent Beamer from eating first word when appending "\par".
* org-e-groff.el (org-e-groff-classes): Added
letter classes.
(org-e-groff-special-tags): New variable to identify special tags.
(org-e-groff--get-tagged-content): New function to retrieve
special tagged content.
(org-e-groff--mt-head): New function to create "memo" type headers.
(org-e-groff--letter-head): New function to create "letter" type headers.
(org-e-groff-template): Handle the "letter" type.
(org-e-groff-headline): handle special tags.
* org-e-groff.el (org-e-groff-item): Removed the `counter' variable from let assignment list.
(org-e-groff-table--align-string): Removed the `attr' and `align' variables from the list assignment list.
* org-e-man.el (org-e-man-item): Removed the `counter' variable from the let assignment list.
(org-e-man-src-block): Removed non needed formatting string that was causing formatting errors for source blocks.
(org-e-man-table--align-string): Removed `attr' and `align' variables from the let assignment list.
* contrib/lisp/org-e-man.el (org-e-man-headline): Fixed call to org-export-first-sibling-p and org-export-last-sibling-p
(org-e-man-table-cell): Fixed call to org-export-get-next-element
- Ability to handle long tables.
- Ability to automatically generate reference lists
- Ability to perform special processing in paragraph
- Ability to disable captions.
- Ability to process special characters.
- Improved table handling.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.
* org-exp-blocks.el (org): Don't require org. Add declarations.
* org-clock.el (org): Don't require org.
* ob-exp.el (org-list-forbidden-blocks): Add declarations.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.
* org-exp-blocks.el (org): Don't require org. Add declarations.
* org-clock.el (org): Don't require org.
* ob-exp.el (org-list-forbidden-blocks): Add declarations.
* contrib/lisp/org-md.el (org-export-md): New customize group.
(org-md-headline-style): New variable.
(org-md-headline): Allow atx and Setext style. Also provide fall-back
for low level headlines.
* contrib/lisp/org-md.el (org-md-section): # protection shouldn't
happen at the section level, when there is no difference between raw
# from export blocks and # in plain text.
* contrib/lisp/org-md.el (org-md-paragraph, org-md-plain-text): Make
sure raw # (inserted with, for example, an export snippet) don't get
escaped. A few false positives don't hurt.
* contrib/lisp/org-export.el (org-export-get-environment,
org-export-collect-tree-properties, org-export-data,
org-export-expand-include-keyword): Use new names.
(org-export--parse-option-keyword): Renamed from
`org-export-parse-option-keyword'.
(org-export--get-subtree-options): Renamed from
`org-export-get-subtree-options'.
(org-export--get-inbuffer-options): Renamed from
`org-export-get-inbuffer-options'.
(org-export--get-buffer-attributes): Renamed from
`org-export-get-buffer-attributes'.
(org-export--get-global-options): Renamed from
`org-export-get-global-options'.
(org-export--allow-BIND-local): Renamed from
`org-export-allow-BIND-local'.
(org-export--confirm-letbind): Renamed from
`org-export-confirm-letbind'.
(org-export--install-letbind-maybe): Renamed from
`org-export-install-letbind-maybe'.
(org-export--get-min-level): Renamed from `org-export-get-min-level'.
(org-export--collect-headline-numbering): Renamed from
`org-export-collect-headline-numbering'.
(org-export--populate-ignore-list): Renamed from
`org-export-populate-ignore-list'.
(org-export--interpret-p): Renamed from `org-export--interpret-p'.
(org-export--prepare-file-contents): Renamed from
`org-export-prepare-file-contents'.
* contrib/lisp/org-e-publish.el (org-e-publish-find-date): Use new
names.
* testing/lisp/test-org-export.el: Update tests.
* contrib/lisp/org-export.el (org-export-define-derived-backend):
Add :export-block keyword. Also fix a generated doc-string.
* contrib/lisp/org-e-beamer.el: Use new keyword.
* contrib/lisp/org-export.el (org-export-define-backend): New macro.
* contrib/lisp/org-e-ascii.el: Use new macro.
* contrib/lisp/org-e-html.el: Use new macro.
* contrib/lisp/org-e-latex.el: Use new macro.
* contrib/lisp/org-e-odt.el: Use new macro.
* contrib/lisp/org-element.el (org-element-block-name-alist): Remove
hard-coded export block names from variable, since they are added
automatically by `org-export-define-backend'.
* testing/lisp/test-org-element.el: Update test.
* contrib/lisp/org-e-html.el (org-e-html-export-as-html): Remove
PUB-DIR, which doesn't make sense in that function.
* contrib/lisp/org-export.el: Apply change in function declaration.
* contrib/lisp/org-e-ascii.el (org-e-ascii-export-as-ascii): New
function.
(org-e-ascii-export-to-ascii): Now autoloaded.
* contrib/lisp/org-e-latex.el (org-e-latex-export-as-latex): New
function.
(org-e-latex-export-to-pdf): Now autoloaded.
(org-e-latex--collect-errors): Renamed from
`org-e-latex-collect-errors'.
(org-e-latex-compile): Apply renaming.
* contrib/lisp/org-e-html.el (org-e-html-export-as-html): New
function.
(org-e-html-export-to-html): Fix docstring.
* contrib/lisp/org-export.el (org-export-dispatch): Use new functions.
* contrib/lisp/org-element.el (org-element-current-element): Use a new
special mode symbol to treat section before first headline
differently. In this case, its boundaries must be computed since it
has not been limited by headline container.
(org-element-parse-elements): Use new special mode symbol.
* contrib/lisp/org-e-latex.el (org-e-latex-subscript,
org-e-latex-superscript): Don't use mathrm in sub/superscripts with
a single LaTeX command or entity.
* contrib/lisp/org-element.el (org-element-set-element): Replace
member with memq.
* contrib/lisp/org-export.el (org-export-get-min-level,
org-export--skip-p, org-export-data, org-export-table-cell-width,
org-export-table-cell-alignment): Replace member with memq.
* contrib/lisp/org-e-ascii.el (org-e-ascii-timestamp): Use :range-end
property when applicable.
* contrib/lisp/org-e-html.el (org-e-html-timestamp): Use :range-end
property when applicable.
* contrib/lisp/org-e-latex.el (org-e-latex-timestamp): Use :range-end
property when applicable.
* contrib/lisp/org-e-odt.el (org-e-odt-timestamp): Use :range-end
property when applicable.
* contrib/lisp/org-element.el (org-element-planning-parser): Store
parsed timestamps without the bracket markers.
(org-element-timestamp-interpreter): Store parsed timestamps without
the bracket markers. Also provide a new property: `:range-end'.
(org-element-planning-interpreter, org-element-timestamp-interpreter):
Apply changes to parsers.
* testing/lisp/test-org-element.el: Add test.
* contrib/lisp/org-element.el (org-element-line-break-parser)
(org-element-line-break-interpreter): Line-break object ends where the
line ends. It doesn't contain the next newline character.
(org-element-parse-objects): Refactoring.
* contrib/lisp/org-element.el (org-element-normalize-contents):
Normalize contents of elements in place. This is required to be
sure that a normalized element still is `eq' to its equivalent in
the parse tree.
* contrib/lisp/org-export.el (org-export-data,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-get-ordinal,
org-export-get-loc, org-export-table-row-group,
org-export-table-cell-starts-colgroup-p,
org-export-table-cell-ends-colgroup-p,
org-export-table-cell-address): Use `eq' instead of `equal' when
possible.
* contrib/lisp/org-e-ascii.el (org-e-ascii-table-row):
* contrib/lisp/org-e-beamer.el (org-e-beamer-select-environment):
* contrib/lisp/org-e-html.el (org-e-html-footnote-section,
org-e-html-latex-environment, org-e-html-paragraph): Use `eq'
instead of `equal' when possible.
* contrib/lisp/org-e-latex.el (org-e-latex--get-footnote-counter):
* contrib/lisp/org-e-odt.el (org-e-odt-do-format-code,
org-e-odt-footnote-def, org-e-odt-item, org-e-odt-latex-environment,
org-e-odt-latex-fragment, org-e-odt-plain-list, org-e-odt-table,
org-e-odt-enumerate-element): Use `eq' instead of `equal' when
possible.
In particular, comparing elements shouldn't be done with `equal' since
they are circular lists. On the other hand, using `eq' is fine if
they belong to the same tree.
* contrib/lisp/org-element.el (org-element-put-property,
org-element-set-contents): Handle special cases like empty or string
arguments.
(org-element-parse-secondary-string): Correctly set `:parent' property
in objects within the secondary string if element or object containing
it is provided as an optional argument.
(org-element-parse-elements, org-element-parse-objects): Rewrite
functions using setter functions.
- Clean up work directory and buffers on error.
- Don't use `org-current-export-file'.
- Handle file paths robustly i.e., don't rely on `default-directory'.
- Remove stale code.
* org-e-html.el (org-e-html-creator-string): New option.
(org-e-html-options-alist): Use it.
* org-export.el (org-export-creator-string): Don't use HTML
tags in the generic creator string.
Thanks to Nicolas for directions on what to change wrt this.
* org-html.el (org-export-as-html): Add links to the Org mode
and GNU Emacs websites When :html-postamble is set to 't.
* org-export.el (org-export-creator-string): Add links to the
Org mode and GNU Emacs websites.
* contrib/lisp/org-export.el (org-export-get-subtree-options): Add
a subtree property for each export option.
* testing/lisp/test-org-export.el: Add tests.
Properties names are obtained by adding "EXPORT_" prefix to buffer
keywords.
* 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.
etc/Makefile: add "schema" to $(ETCDIRS)
contrib/odt/etc/schema/od-manifest-schema-v1.2-cs01.rnc: move to etc/schema/od-manifest-schema-v1.2-cs01.rnc
contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc: move to etc/schema/od-schema-v1.2-cs01.rn
contrib/odt/etc/schema/schemas.xml: move to etc/schema/schemas.xml
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
Function renamed from `org-export-initial-options'.
(org-export-store-footnote-definitions): New function.
(org-export-as): Store footnote definitions at the appropriate place.
It happens twice if buffer gets expanded.
* testing/lisp/test-org-export.el: Add test.
* contrib/lisp/org-mime.el (org-mime-file): Mark images included as
part of html portions as "disposition=inline".
(org-mime-multipart): When images are present wrap html and images
in a multipart/mixed structure.
(org-mime-htmlize): When images are present wrap html and images in
a multipart/mixed structure.
* contrib/lisp/org-element.el (org-element-interpret--affiliated-keywords):
Fix interpretation of affiliated keywords.
(org-element-interpret-data): If no `:post-blank' property is
specified, assumed there is no blank line or whitespace after the
element or object.
* testing/lisp/test-org-element.el: Add a test.
* contrib/lisp/org-element.el (org-element-footnote-definition-parser):
Remove the need for `org-footnote-at-definition-p'.
(org-element-footnote-reference-parser): Remove the need for
`org-footnote-at-reference-p'.
(org-element-footnote-reference-successor): Do not use
`org-footnote-get-next-reference'.
* testing/lisp/test-org-element.el: Add test.
* contrib/lisp/org-element.el (org-element-parse-elements): Enter
section type elements even if granularity is set to
`greater-element'.
(org-element-parse-buffer): Update doc-string.
* testing/lisp/test-org-element.el: Add test.
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-inlinetask-parser, org-element-item-parser,
org-element-verse-block-parser, org-element-current-element): New
optional argument so parsing of secondary string is not mandatory.
(org-element-parse-elements): Remove duplicate part from doc-string.
(org-element-at-point): Improve speed of function since secondary
string are never parsed.
(org-element-secondary-value-alist): Simplify doc-string.
* testing/lisp/test-org-element.el: Add test.
* contrib/lisp/org-element.el (org-element-center-block-parser,
org-element-quote-block-parser,
org-element-quote-block-interpreter,
org-element-special-block-parser,
org-element-special-block-interpreter,
org-element-babel-call-interpreter,
org-element-comment-block-parser,
org-element-export-block-interpreter,
org-element-src-block-interpreter,
org-element-example-block-interpreter): Use standard case for Org
syntax.
(org-element-inlinetask-parser): Remove `:raw-value' property.
(org-element-headline-interpreter,
org-element-inlinetask-interpreter): Rely on `:title' property instead
of `:raw-value'.
(org-element-item-parser): Remove `:raw-tag' property.
(org-element-item-interpreter): Do not use `:raw-tag' anymore. Rely
on `:tag' instead.
(org-element-verse-block-parser): Remove `:raw-value' property. Use
standard case for Org syntax, too.
(org-element-verse-block-interpreter): Rely on `:value' instead of
`:raw-value'.
(org-element-footnote-reference-parser): Remove `:raw-definition'
value.
(org-element-footnote-reference-interpreter): Use `:inline-definition'
property, when non-nil, instead of `:raw-definition'.
(org-element-radio-target-parser): Rename `:raw-value' into `:value'.
Most raw values don't add worthy information to an element, since they
can be retrieved with an interpretation of the secondary string they
represent.
It's useful for getting notifications for todo items and more flexible
than org-agenda-to-appt.
Here a summary:
- different warning periods for different todo-types
- fine grained warning periods (smallest unit is second)
- continue notifications, when deadline is overdue
- easy modification of timestamps (just one click, to say
"let's do it tomorrow")
- switch from "todo" to "done" by clicking on the notification window
- configurable notification types (email, notifications-notify, beep,
etc.)
- configurable notification period
- configurable notification duration
- crescendo notifications (be more aggressive, when time gets closer to
deadline)
There was a little thread about this subject:
http://thread.gmane.org/gmane.emacs.orgmode/48832
Example usage:
(org-notify-add 'appt
'(:time "-1s" :period "20s" :duration 10
:actions (-message -ding))
'(:time "15m" :period "2m" :duration 100
:actions -notify/window)
'(:time "2h" :period "5m" :actions -message)
'(:time "1d" :actions -email))
This means for todo-items with `notify' property set to `appt': 1 day before
deadline, send a reminder-email, 2 hours before deadline, start to send
messages every 5 minutes, then, 15 minutes before deadline, start to pop up
notification windows every 2 minutes. The timeout of the window is set to
100 seconds. Finally, when deadline is overdue, send messages and make
noise.
lisp/org.el (org-scan-tags): Require todo-only argument, and document
that it should be the same one set by make-org-tags-matcher.
Fix documentation to explain that todo-only is really
not-done-todo-only.
(org-make-tags-matcher): If todo part of matcher starts with /!,
matcher now always checks that the TODO keyword is present and
is a not-done state. This matters e.g. for org-map-entries
which unlike org-scan-tags does not do its own separate todo-only
filtering. Added docs to explain matcher dependencies.
(org-map-entries): Make sure todo-only is correctly passed from
org-make-tags-matcher to org-scan-tags.
* lisp/org-clock.el: (org-clock-get-table-data): Make sure todo-only
does not leak when it is set by make-org-tags-macher.
* lisp/org-crypt.el: (org-encrypt-entries, org-decrypt-entries): Make
sure todo-only is correctly passed from org-make-tags-matcher to
org-scan-tags.
* contrib/lisp/contacts.el: (org-contacts-filter) : Make sure todo-only
is correctly passed from org-make-tags-matcher to org-scan-tags.
* contrib/lisp/org-export.el (org-export-as): Fix export with Babel
calls outside export scope by providing buffer's name holding full
data instead of the one holding its copy limited to scope.
* testing/lisp/test-org-export.el (test-org-export/export-scope): Add
a test.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.
This commit also bumps the version number to 7.8.06.
The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.
This commit reverts back the maint branch to its state before
merging the master branch. From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
* contrib/lisp/org-element.el (org-element-example-block-parser,
org-element-src-block-parser): Add `:number-lines',
`:preserve-indent, `:retain-labels', `:use-labels' and
`:label-fmt' properties.
* contrib/lisp/org-export.el (org-export-resolve-coderef,
org-export-get-loc): Apply changes to src-block and example-block
elements' properties.
(org-export-unravel-code, org-export-format-code,
org-export-format-code-default): New functions.
(org-export-handle-code): Removed function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-example-block): Use new
function.
(org-e-latex-src-block): Use new API. Better handling of numbered
lines with special packages.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-example-block,
org-e-ascii-src-block): Use new functions.
* testing/lisp/test-org-element.el: Add tests.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-element.el (org-element-map): New optional argument
to avoid recursion into certain recursive types.
* contrib/lisp/org-export.el (org-export-footnote-first-reference-p,
org-export-get-footnote-number,
org-export-collect-footnote-definitions): Use new argument from
`org-element-map'.
* testing/lisp/test-org-export.el: Add test.
The new argument allows to force entering footnotes definitions at
a certain time (when their first reference is found) but not a second
time when they are encountered in the parse tree.
Thanks to Jambunathan for reporting this.
* lisp/org.el (org-link-search): Search for #+name affiliated keywords
and invisible targets.
* contrib/lisp/org-element.el (org-element-link-parser): Remove "ref"
links relative part.
(org-element-target-parser): Move property name from `:raw-value' to
`:value'.
(org-element-recursive-objects): Remove targets from tables. Cells
are not parsed unless explicitely asked by back-end developer, too
late. A target wouldn't be noticed in time. One solution could be to
parse every table, but that's time consumming.
(org-element-object-restrictions): Target are not recursive anymore.
* contrib/lisp/org-export.el (org-export-resolve-fuzzy-link): Find
elements with a matching "#+name: path" affiliated keyword.
(org-export-get-ordinal): Make special cases for headlines, items,
footnotes definitions and references.
(org-export-resolve-ref-link): Removed function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Handle
cross-reference numbers.
(org-e-latex-target): Targets have no contents.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--describe-links): Ignore
fuzzy links in link description at the end of the section.
(org-e-ascii-link): Handle cross-reference numbers.
* testing/contrib/lisp/test-org-export.el: Add tests.
* testing/lisp/test-org.el: Add tests.
* contrib/lisp/org-export.el (org-export-numbered-headline-p): New function.
* EXPERIMENTAL/org-e-ascii.el: Apply new function.
* EXPERIMENTAL/org-e-latex.el: Apply new function.
* testing/lisp/test-org-export.el: Add a test.
* contrib/lisp/org-element.el (org-element-map): Don't forget to apply
function on paragraph even when no object should be mapped. Just
don't recurse in it.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-footnote-reference):
Correctly handle numbering with nested footnotes.
* contrib/lisp/org-element.el (org-element-map): Apply function to
element or object before applying it to its secondary string, if
any. Otherwise, linearity is broken.
* contrib/lisp/org-export.el (org-export-footnote-first-reference-p,
org-export-get-footnote-number): Take care of recursive footnotes.
(org-export-get-genealogy): Correctly get genealogy of an item within
a secondary string.
* testing/contrib/lisp/test-org-export.el: Add tests.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-footnote-reference): Allow
nested footnotes.
* contrib/lisp/org-element.el (org-element-string-restrictions): Allow
footnote references within a footnote reference.
* testing/contrib/lisp/test-org-export.el: Add a test for nested
footnotes.
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
Do not overwrite any user's ignore list.
* testing/contrib/lisp/test-org-export.el: Add test.
A good way to populate `:ignore-list' is through the use of
`org-export-filter-parse-tree-functions', with the help of
`org-element-map' and `org-export-ignore-element'. As an example, the
following code will skip every headline containing the word "note"
in its title during a LaTeX export:
(defun user-skip-note-headlines (data backend info)
;; For now LaTeX back-end is called `e-latex'.
(when (eq backend 'test)
;; Traverse the parse tree, adding to ignore list any headline
;; matching criteria.
(org-element-map
data 'headline
(lambda (headline)
(when (string-match "\\<note\\>"
(org-element-property :raw-value headline))
(org-export-ignore-element headline info)))
info))
;; Return original DATA.
data)
Then install it in parse-tree filters:
(add-to-list 'user-skip-note-headlines org-export-filter-parse-tree-functions)
Back-end delevopers will install it via `org-BACKEND-filters-alist'
where BACKEND stands for the name of the back-end considered. Se
`org-export-filters-alist' for more information.
* contrib/lisp/org-element.el (org-element-map): Remove use of an
alternate communication channel. Function is now called with only
one argument.
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
(org-export-collect-headline-numbering, org-export--selected-trees,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-resolve-fuzzy-link,
org-export-resolve-id-link, org-export-resolve-ref-link,
org-export-resolve-coderef, org-export-get-ordinal,
org-export-get-loc, org-export-collect-headlines): Apply changes.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--unique-links): Apply
changes.
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index): Apply
changes.
* contrib/lisp/org-export.el (org-export-expand-include-keyword): Use
another optional argument to specify the current working directory.
(org-export-as): Apply changes.
* testing/contrib/lisp/test-org-export.el: Add tests.
* testing/examples/include.org: New test file.
* testing/examples/include2.org: New test file.
* contrib/lisp/org-export.el (org-export-snippet-backend): New
function.
(org-export--skip-p): Remove automatic skip of export snippets.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-export-snippet): Use new
function.
* EXPERIMENTAL/org-e-html.el (org-e-html-export-snippet): Use new
function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-export-snippet): Use new
function.
* EXPERIMENTAL/org-e-odt.el (org-e-odt-export-snippet): Use new
function.
* testing/contrib/lisp/test-org-export.el: Add test.
The idea behind this change is that a given back-end may decide to
keep an export snippet not directly targetted at it (i.e. a beamer
back-end that would want to keep latex snippets). Hence, filtering
snippets is on back-ends side, and a new function is added to help
them in that task.
* contrib/lisp/org-element.el (org-element-headline-parser): COMMENT
and QUOTE keywords, ARCHIVE tags are case sensitive.
* testing/contrib/lisp/test-org-element.el: New file.
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
Remove `:use-select-tags' property.
(org-export-populate-ignore-list): Renamed from
`org-export-get-ignore-list'.
(org-export--selected-trees): Renamed from
`org-export-use-select-tag-p'.
(org-export--skip-p): Use an additional argument to specify list of
trees containing a select tag.
(org-export-select-tags, org-export-exclude-tags,
org-export-with-priority): Change doc-string.
* testing/contrib/lisp/test-org-export.el: Tests modified
accordingly.
* contrib/lisp/org-element.el: Move archived tree handling out of
org-element-map.
* contrib/lisp/org-export.el (org-export-get-ignore-list): Properly
ignore archived with `org-export-with-archived-trees' set to
`headline'.
* testing/contrib/lisp/test-org-export.el (test-org-export/handle-options):
Add a test for that.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options): Fix
but with incomplete macros returning an error. Also with behaviour
`nil', only insert new value if none was defined before.
(org-export-use-select-tags-p): Fix bug preventing it from properly
detecting select-tags.
(org-export--skip-p): Small refactoring
* testing/contrib/lisp/test-org-export.el: New test file.
* contrib/lisp/org-export.el (org-export-get-parent): New function.
(org-export-data, org-export-get-previous-element,
org-export-get-next-element): Use new function.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-item): Use new function.
Refactor code.
(org-e-ascii-paragraph): Use new function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-item): Use new function.
* EXPERIMENTAL/org-e-html.el (org-e-html-item): Use new function.
* EXPERIMENTAL/org-e-odt.el (org-e-odt-item): Use new function.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
org-e-ascii-item, org-e-ascii-paragraph): Apply `:genealogy' removal.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-item): Apply `:genealogy'
removal.
* contrib/lisp/org-element.el (org-element-map): Do not compile
genealogy. Also use `:ignore-list' when possible.
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
Populate `:ignore-list' before starting to transcode each element in
subtree.
(org-export-get-min-level): Use `:ignore-list'.
(org-export--skip-p): Renamed from `org-export-skip-p'. This is now
an internal function.
(org-export-data): Use and update `:ignore-list'. Do not update
genealogy.
(org-export-ignore-element): New function
(org-export-last-sibling-p): Small refactoring.
(org-export-resolve-fuzzy-link): Apply `:genealogy' removal.
(org-export-get-genealogy): Use a more efficient algorithm.
The equivalent of (plist-get info :genealogy) is
now (org-export-get-genealogy blob info), blob being any element or
object.
* contrib/lisp/org-element.el (org-element-object-restrictions):
Modify docstring.
(org-element-secondary-value-alist): New variable.
(org-element-map): Possibly look into secondary strings when mapping
through objects. Also sanitize some function names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--unique-links): Make use of
org-element-map improvement.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-item): Use new
`org-list-get-item-number' function.
* contrib/lisp/org-element.el (org-element-item-interpreter): Use new
`org-list-get-item-number' function.
* contrib/lisp/org-element.el (org-element-string-restrictions): Allow
targets in tables. Also fix wrong symbol for verse-blocks.
(org-element-verse-block-parser): Apply change.
* contrib/lisp/org-element.el (org-element-link-parser): Recognize
"ref" type links as a new type of Org link.
* contrib/lisp/org-export.el (org-export-resolve-ref-link): New
function.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--describe-links): Do not
describe "ref" type links at the end of each section.
(org-e-ascii-link): Handle "ref" type links.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Handle "ref" type
links.
"ref" type links are Org answer to LaTeXisms like "\ref{some-label}".
Hence, [[ref:some-label]] will be replaced with the sequence number of
the element with name "#+name: some-label" during export.
* contrib/lisp/org-export.el (org-export-dispatch): Put
temporary buffer that holds exported HTML source in either
`nxhtml-mode' or `nxml-mode'.
`nxhtml-mode' is *not* part of stock Emacs while `nxml-mode' is.
* contrib/lisp/org-export.el (org-export-dispatch)
(org-export-dispatch-ui): Add new entries for the new HTML
exporter.
* EXPERIMENTAL/org-e-html.el: New file. This is a very rough
cut based out on org-xhtml.el and org-e-latex.el. The file
retains all the LaTeXisms in either commented form or
otherwise. This is deliberate so as to have a quick look at
the reference implementation. Retaining the organization
style of org-xhtml.el would enable easy creation of
org-e-odt.el by simply replacing e-html with e-odt for the
most part.
The changes here covers fairly a good ground - say 90% - of my
unit test file.
* contrib/lisp/org-export.el (org-export-as, org-export-to-buffer,
org-export-to-file): Add an optional argument to prevent including
files and executing Babel code.
This can be used as a basis for an Org to Org exporter.
* contrib/lisp/org-element.el (org-element-recursive-objects): Add
macro object type to recursive types.
(org-element-object-restrictions): Macros can only contain other
macros.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options): Parse
macro value, unless it it meant to be eval'ed.
(org-export-expand-macro): Expand macros recursively.
* contrib/lisp/org-element.el (org-element-link-parser): Do not parse
radio link as a recursive link.
* contrib/lisp/org-export.el (org-export-solidify-link-text): Make
sure "\" isn't allowed in solidified strings. This is required to
allow entities in radio targets.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Apply changes to
radio links.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-link): Apply changes to
radio links.
* contrib/lisp/org-export.el (org-export-get-genealogy,
org-export-get-parent-paragraph): New functions.
(org-export-get-parent-headline, org-export-get-previous-element,
org-export-get-next-element): Internally use new function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link--inline-image,
org-e-latex-link): Apply changes to topology functions.
This new function is especially useful since every object derives its
properties from those the containing paragraph.
* contrib/lisp/org-element.el (org-element-object-restrictions): Allow
plain links in link description.
* contrib/lisp/org-export.el (org-export-default-inline-image-rule):
New variable.
(org-export-inline-image-p): Use rules instead of extensions. A rule
is a regexp applied to path for a given type of link. It allows to
extend inline images to non-local files.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-inline-image-rules): New
variable.
(org-e-latex-inline-image-extensions): Removed variable
There are two motivations behind this change. The first one is to
allow, for example, an HTML exporter to define a rule like the
following:
("http" . "\\.\\(png\\|jpg\\|jpeg\\|gif\\)\\(\\?\\(\\w+=\\w+&?\\)*\\)?")
The other one is to properly define thumbnails (clickable images),
like the following:
[[http://orgmode.org][file:~/my-logo.png]]
* contrib/lisp/org-export.el (org-export-filters-alist): New variable.
(org-export-install-filters): New function.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-filters-alist): New variable.
Back-end specific filters can now be installed in communication
channel with `org-BACKEND-filters-alist' variable.
* contrib/lisp/org-export.el (org-export-get-environment): Renamed
function from org-export-collect-options. Also make arguments
optionals.
(org-export-as): Apply renaming. Refactor code a bit.
(org-export-get-inbuffer-options): Remove string argument from
signature. Backend is now optional. Also, check if option match is
really a keyword.
(org-export-get-global-options, org-export-parse-option-keyword): Make
backend argument optional.
* contrib/lisp/org-export.el (org-export-collect-options): Remove
useless argument.
(org-export-initial-options): Add an `:input-file' property in
communication channel.
* contrib/lisp/org-export.el (org-export-initial-options): Initialize
correctly some macros when buffer is a clone.
(org-export-expand-macro): Ignore output when macro's value is nil.
* contrib/lisp/org-element.el (org-element-map): Remove included file
expansion part.
* contrib/lisp/org-export.el (org-export-as): Expand include keywords
before executing blocks.
(org-export-expand-include-keyword, org-export-prepare-file-contents):
New functions.
(org-export-included-file, org-export-parse-included-file): Removed
functions.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-keyword): Remove include
keyword handling.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-keyword): Remove include
keyword handling.
Back-ends do not need anymore to take care of #+include keywords.
This change is required since file inclusion can potentially break any
structure. Hence, it should be done before parsing.
* contrib/lisp/org-export.el (org-export-with-current-buffer-copy):
Copy `outline-level' value in the temporary buffer. This fixes
a bug introduced by commit
10b06ae53c.
* contrib/lisp/org-element.el (org-element-item-parser): If item's
first line is empty, ensure contents start at a beginning of line so
that child can be correctly parsed.
* contrib/lisp/org-element.el (org-element-dual-keywords): Move
caption in the dual keywords category.
(org-element--affiliated-re): Change regexp matching a dual keyword.
(org-element-collect-affiliated-keywords): Dual parsed keywords also
get their optional value parsed as a secondary string.
* EXPERIMENTAL/org-e-latex.el (org-e-latex--caption/label-string,
org-e-latex-src-block): Apply caption status change.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--build-caption): Apply
caption status change.
(org-e-ascii--list-listings, org-e-ascii--list-tables): Apply caption
status change. Also use short caption name when available.
The status change implies a syntax change. Captions can now share
#+results: syntax, which mean that they can have a secondary
value. Thus, the following Org snippets are valid, the first two being
equivalent.
#+caption: long name
#+caption[]: long name
#+caption[short name]: long name
* contrib/lisp/org-export.el (org-export-get-inbuffer-options):
Replace macro with an empty string when no value is provided.
Ignore macros with an ill-formed key.
* contrib/lisp/org-export.el (org-export-option-alist): Add filters as
properties in the communication channel. This allows back-end
developers to install their own filters at run time instead of
making them reside in a global variable.
(org-export-data, org-export-as): Read filters from communication
channel instead of global variables.
(org-export-filter-apply-functions): Only accept list of functions.
Also change order of calling: it is now LIFO.
* contrib/lisp/org-export.el (org-export-collect-elements): Change
output to list of elements instead of their beginning position.
Also add an optional predicate argument for fine grain control.
Remove back-end argument.
(org-export-collect-tables, org-export-collect-listings): Apply
changes from previous function.
(org-export-collect-figures): Apply changes from previous function.
Also require a predicate to correctly define the concept of figure.
* contrib/lisp/org-export.el (org-export-get-ordinal): Correctly
handle predicate in `org-export-get-ordinal'. Also allow to count
more than one element type in the same sequence with optional
argument TYPES.
* contrib/lisp/org-element.el (org-element-quote-section-parser):
Assume point is at quote-section beginning.
(org-element-guess-type): Move point to section beginning before
calling for quote-section parser.
(org-element-parse-elements, org-element-current-element): Correctly
detect and parse quote section.