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