* lisp/org.el (org-find-olp): Use the level of the correct match to
continue search.
The problem was that a second match of an identical headline on
another level would corrupt the value of LEVEL that is used to set up
the next search stop.
Chao LU writes:
> For org capture template, if I set an template like this:
> ("i" "INBOX" entry (file+olp (concat org-private-dir "/iPrv.org")
> "INBOX" "test") "* %?" :prepend t)
>
> And for the iPrv.org, I have this structure:
> * INBOX
> ** test
>
> Then it works.
>
> But if the first level and the second level happen to have the same
> title (it does happen to me sometimes), like:
> * INBOX
> ** INBOX
>
> ("i" "INBOX" entry (file+olp (concat org-private-dir "/iPrv.org")
> "INBOX" "INBOX") "* %?" :prepend t)
> Then Org will prompt an error.
* lisp/org-list.el (org-toggle-checkbox): build value of
org-keyword-time-regexp instead of using it directly, as it's
buffer-local, and function might be called outside Org.
* lisp/org-list.el (org-list-struct,org-in-item-p): don't assume end
of blocks or drawers necessarily start somewhere. It it isn't the
case, treat them as normal text.
* lisp/org-latex.el (org-export-latex-date-format): Change default date
format to \today. This has the same result but respects the language set in
the document by default.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org-list.el (org-list-checkbox): when called from an headline,
function would normally skip drawers, but not if a SCHEDULED or
DEADLINE keyword is standing before the drawer. Also avoid problems
if function is called in buffers not is Org mode.
* org-clock.el (org-clock-report): change the scope of the
inserted clock report depending on whether the point is within
a subtree (:scope subtree) or not (:scope file).
* lisp/org-latex.el (org-export-latex-preprocess): Correctly
match starred command names.
Many LaTeX commands exist in both normal and starred forms. Adjust
the regexp in `org-export-latex-preprocess' to match the starred form
as well.
* lisp/org-html.el (org-export-as-html): Get local value of
org-export-with-section-numbers from the buffer's plist. Deal
specially with the case the resulting value is an integer.
(org-html-level-start): New optional argument of the option plist used
instead of `org-export-with-section-numbers'. Also deal specially
with the case that the value is an integer.
When `org-export-with-section-numbers' (or the buffer-local
:section-numbers option) is an integer, we now export the first NUM
levels of headings with numbers and lower-level headings without.
* lisp/org-latex.el (org-export-latex-subcontent): Deal specially with
the case that NUM is an integer.
We would sometimes like to have numbered \sections in LaTeX export but
unnumbered \subsections and so forth. That is, use the starred
equivalents for all sectioning commands below a certain level.
Previously, the num: option specification could only specify whether
sections should be numbered or unnumbered at all levels. We now treat
an integer value specially, if num:N is supplied then the highest N
levels are numbered, and lower levels are exported without numbering.
* org-protocol.el (org-protocol-do-capture): allow template
keys of two characters.
(org-protocol-default-template-key): Update the docstring to
reflect the change in `org-protocol-do-capture'.
* org-taskjuggler.el (org-taskjuggler-assign-resource-ids): Replace
recursive implementation with an iterative one.
That way we can avoid to have ask users to increase
`max-lisp-eval-depth'.
* lisp/org-inlinetask.el (org-inlinetask-export-templates): fix
default templates.
(org-inlinetask-export-handler): Ensure contents of inline task, if
any, starts and ends with a newline character. Refactor and comment
code.
* lisp/org-list.el (org-list-to-generic): set a default term for
ill-formed description lists. Do not insert newline characters
unless told to.
(org-list-to-texinfo,org-list-to-html): apply changes to
`org-list-parse-liste'.
* org-clock.el (org-clock-clocktable-language-setup): Add a
string.
(org-clocktable-write-default): Use the new localized string
in `org-clock-clocktable-language-setup'.
(org-taskjuggler-assign-resource-ids): Replace recursive
implementation with an iterative one.
That way we can avoid to have ask users to increase
`max-lisp-eval-depth'.
* org-taskjuggler.el (org-taskjuggler-components): Escape quotes in
headlines.
Taskjuggler will barf if the task names (which are double quoted
strings) contain double quotes.
* org-taskjuggler.el (org-taskjuggler-compute-task-leafiness): Compute
the leafiness of a node.
(org-taskjuggler-open-task, org-export-as-taskjuggler): Mark a node as
a milestone if it is a leaf and has no effort.
Mark a task as a milestone if it has neither an effort, a duration, an
end or a period. This is needed for tj3 export as tj3 fails to compile
the file if there is a leaf node with no computable end date. tj2
happily ignored the situation, but TJ3 throws an error.
* org-taskjuggler.el (org-export-taskjuggler-target-version):
(org-taskjuggler-targeting-tj3-p): Add some minimal infrastructure to
handle export to both tj2 and tj3.
(org-taskjuggler-open-task): Use a different way to purge allocations
for tj2 and tj3.
* lisp/org-footnote.el: (org-footnote-auto-label): New random option
* lisp/org-footnote.el: (org-footnote-new): Create random footnote
labels with unique ids