* 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.