* lisp/org-element.el (org-element-macro-parser): Allow to escape
escaping character before a comma. Also do not trim spaces at
argument boundaries.
* doc/org.texi (Macro replacement): Update documentation about
possible locations and escaping mechanism.
* testing/lisp/test-org-element.el: Add tests.
With this patch, macro's arguments are read as the following:
"a,b" -> '("a" "b")
"a\,b" -> '("a,b")
"a\\,b" -> '("a\" "b")
"a\\\,b" -> '("a\,b")
"a\\\\,b" -> '(a"\\" "b")
Note that with the patch, you only need to escape backslashes before
a comma:
"a\\b\,c" -> '("a\\b,c")
* org-element.el (org-element-paragraph-separate): Use
new name `org-list-allow-alphabetical'.
* org-list.el (org-list-allow-alphabetical): Rename from
`org-alphabetical-lists'.
(org-list-empty-line-terminates-plain-lists): Rename from
`org-empty-line-terminates-plain-lists'.
(org-checkbox-hierarchical-statistics): Rename from
`org-hierarchical-checkbox-statistics'.
* org.texi (Plain lists, Checkboxes): Use non-obsolete
variable names.
* lisp/org-element.el (org-element-all-successors): Add `plain-link'
successor.
(org-element-object-restrictions): Remove `link' within `link'. Allow
`plain-link' instead.
(org-element-plain-link-successor): New function.
* testing/lisp/test-org-element.el: Add test.
Plain links within links are needed for the following kind of syntax:
[[http://orgmode.org][file:unicorn.png]]
No other link type is allowed within links.
* lisp/org-element.el (org-element-footnote-definition-parser):
Require 2 blank lines to separate footnote definition.
* lisp/org-footnote.el (org-footnote-at-definition-p): Require 2 blank
lines to separate footnote definition.
* doc/org.texi: Update documentation for footnotes.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org-footnote.el: Add tests.
Footnote definitions can still be separated with other footnote
definitions and headlines. This change allows to have multiple
paragraphs in a footnote definition without resorting to the "\par"
trick.
* lisp/org-element.el (org-element-headline-parser): Node
property :OPTIONAL_TITLE: in a headline will be parsed and stored
under :optional-title property.
* lisp/ox.el (org-export-get-optional-title): New function.
* lisp/org-element.el (org-element-headline-parser,
org-element-inlinetask-parser): Upcase properties. This is done to
avoid confusion between properties from parser (e.g. `:end') and
properties from the property drawer (e.g. :END:).
In particular, it means that :CUSTOM_ID: property is accessed through:
(org-element-property :CUSTOM_ID headline)
* lisp/ox.el (org-export-resolve-fuzzy-link): Whitespaces are not
significant when matching a fuzzy link.
* lisp/org-element.el (org-element-link-parser): Do not remove
newlines characters in paths anymore, since this is not required.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-ox.el: Add test.
* lisp/org-element.el (org-element-at-point): Return nil when in the
first empty lines of the buffer. Return headline when in empty
lines just after the headline.
* lisp/org-element.el (org-element--current-element): Add a limit
argument.
(org-element--collect-affiliated-keywords): Fix parsing of orphaned
keyword at the end of an element.
* testing/lisp/test-org-element.el: Add test.
* lisp/org-element.el (org-element-macro-parser): Fix error when last
argument ends with a protected comma.
* testing/lisp/test-org-element.el (test-org-element/macro-parser):
Add tests.
* lisp/org-element.el (org-element-parse-buffer, org-element-map,
org-element-at-point, org-element-context): Be more verbose in
docstrings. Also fix typos.
* lisp/org-element.el (org-element-at-point): When point is before any
element, in the first blank lines of the buffer, return nil. When
point is within blank lines just after a headline, return that
headline.
(org-element-context): Return nil when point is within the blank at
the beginning of the buffer.
* testing/lisp/test-org-element.el: Add tests.
* lisp/org-element.el (org-element-context): Add an optional argument
so (org-element-context)
and (org-element-context (org-element-at-point)) are equivalent.
* testing/lisp/test-org-element.el: Add test.
* lisp/org-element.el (org-element-object-variables): New variable.
(org-element-parse-secondary-string): Copy some buffer-local variables
to the temporary buffer created to parse the string so links can still
be properly expanded.
(org-element-link-parser): Link expansion and translation are applied
transparently for the parser.
* lisp/org-element.el (org-element--parse-elements,
org-element-at-point): Fix parsing of a list in a block in a list.
* testing/lisp/test-org-element.el: Add test.
* lisp/org-element.el (org-element-line-break-parser): Line break
includes the newline character following the backslashes.
(org-element-line-break-interpreter): Apply changes to line break
parsing.
* lisp/org-element.el (org-element-timestamp-interpreter): Fix
timestamp interpreter when raw value isn't available.
* testing/lisp/test-org-element.el: Update test.
* lisp/org-element.el (org-element-context): When point is between two
objects, be sure to return the second one.
* testing/lisp/test-org-element.el: Add test.
* lisp/org-element.el (org-element-timestamp-parser): Timestamp with
time range has active/inactive-range type.
* testing/lisp/test-org-element.el: Add test.
In order to know if starting date/time is really the same as ending
date/time, this patch permits to use the following:
(memq (org-element-property :type timestamp) '(active inactive))