* lisp/ox.el (org-export--collect-headline-numbering): Remove footnote
section from TOC.
(org-export-collect-headlines): Do not count footnote section when
numbering a headline.
* testing/lisp/test-ox.el: Add tests.
* ox-html.el (org-html-link): Don't throw an error if the
value of the :ID: property has not been generated by uuidgen.
Thanks to Florian Beck for requesting this.
* org-pcomplete.el (pcomplete/org-mode/file-option/x):
Resurrect. Use `org-default-options' to initialize completion
fonctions for the most important keywords.
* org-macs.el (org-default-options): Rename and adapt from
`org-get-current-options'.
This is a partial revert of e14cf780 feature-wise. The idea is
that it may be useful to get completion, even when it ends up with
the default value, because the user may want to adapt the default
values instead of re-typing them.
* lisp/ox-ascii.el (org-ascii-inner-template): New function.
(org-ascii-template): Use new function.
(org-ascii-export-as-ascii, org-ascii-export-to-ascii): Update
docstring.
* org.el (org-timestamp-change): New optional parameter
`suppress-tmp-delay' to suppress temporary delay like "--2d".
(org-auto-repeat-maybe): Suppress temporary delays.
Thanks to Michael Brand for suggesting this.
* org-agenda.el (org-agenda-get-scheduled): When the delay is
of the form "--2d" and there is a repeater, ignore the delay
for further repeated occurrences.
Thanks to Michael Brand for suggesting this was somehow needed.
* lisp/ox.el (org-export-as): Call `inner-template' function, if
available.
* lisp/ox-html.el (org-html-inner-template): New function.
(org-html-template): Move all parts that should be inserted even in
a body-only export into `org-html-inner-template'.
* testing/lisp/test-ox.el: Add tests.
* 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.
* org-agenda.el (org-agenda-schedule, org-agenda-deadline):
Cosmetic changes.
(org-agenda-show-new-time): Fix bug when displaying a
temporary overlay with the scheduled/deadline information.
Thanks to Thomas Morgan for reporting this bug and testing the patch.
* org.el (org-fill-paragraph-with-timestamp-nobreak-p): New
function.
(org-setup-filling): Use it to prevent breaking a timestamp
when filling a paragraph.
Thanks to William for requesting this.
* lisp/ox-texinfo.el (org-texinfo-src-block): Remove spurious newline
character as `org-export-format-code-default' already makes sure the
string returned will end with a single one.
Thanks to Frank Fischer for reporting it.
* lisp/org.el (org-cycle-global-status)
(org-cycle-subtree-status): Set state property.
(org-heading-components): Use org-heading-regexp in
orgstruct-mode.
(orgstruct-heading-prefix-regexp, orgstruct-setup-hook): New
options.
(orgstruct-initialized): New variable.
(orgstruct-mode): Simplify implementation.
(orgstruct-setup): Simplify implementation. Translate keys to
their most general equivalent.
(orgstruct-make-binding): Generate index on the fly. Discard
alternative keys. Bind variables according to
orgstruct-heading-prefix-regexp.
(org-get-local-variables): Honour state property.
(org-run-like-in-org-mode): Do not override variables with
non-default values.
(org-forward-heading-same-level): Do not skip to headlines on
another level. Handle negative prefix argument correctly.
(org-backward-heading-same-level): Use
org-forward-heading-same-level.
* lisp/ox-latex.el (org-latex-headline): When a function returns
a sectionning command, only one placeholder should be required.
Thanks to Florian Beck for reporting this.
* add a header-row delimiter to the tables returned from mysql
* add new sql-specific header args for the database connection, and implements them for mysql
* add support for :colnames (mysql only)
* (minor) add an edebug spec to org-babel-result-cond to allow edebugging through it
* add some doc about what header args are used
The syntax of result hashes with times are now as show below.
#+RESULTS[<TIME> HASH]:
* lisp/ob-core.el (org-babel-result-regexp): Simplified regexp given new
time hash layout.
(org-babel-current-result-hash): New match string.
(org-babel-hide-hash): New match string.
(org-babel-where-is-src-block-result): New match string, and inserting
hashes in the new format.
* lisp/ox-latex.el (org-latex-special-block): Add :options attribute
to special blocks to specify options.
With this patch, the following is now possible (again):
#+attr_latex: :options [Someone]
#+begin_theorem
Something
#+end_theorem
* org.el (org-read-date-minibuffer-local-map): Use "." to go
to today's date.
Unless I'm crazy, there is a regression here, but I'm unable to find
when the regression started for now.
* ob-core.el (org-babel-next-src-block)
(org-babel-previous-src-block): Rewrite using
`org-next-block'.
* org.el (org-next-block, org-previous-block): New navigation
commands.
(org-mode-map): Bind the new commands to C-c C-F and C-c C-B
respectively.
Thanks to Bill White for suggesting this.
* org-agenda.el (org-agenda-write): Don't copy headlines'
subtrees when writing to an .org file.
* org.el (org-copy-subtree): New parameter `nosubtrees'.
* lisp/ox-latex.el (org-latex-example-block, org-latex-src-block):
Ignore element if it's empty. This fixes error "apply: Wrong number
of arguments: max, 0".
* lisp/ox-beamer.el (org-beamer-template): Provide an error when LaTeX
class is invalid.
* lisp/ox-latex.el (org-latex-template): Provide an error when LaTeX
class is invalid.
Patch suggested by Sébastien Vauban
* lisp/org.el (org-modules): Remove export back-ends from the list.
Update docstring.
(org-export-backends): New variable.
* lisp/ox.el (org-export-async-start): Make sure export framework is
required in the external process.
* lisp/org-macs.el (org-if-unprotected, org-if-unprotected-1,
org-if-unprotected-at): Removed macros.
(org-re-search-forward-unprotected): Removed function.
* lisp/org.el (org-format-latex): Remove reference to `org-protected'.
* lisp/org-list.el (org-list-struct): Remove reference to
`org-example' and `org-protected'.
* lisp/org-footnote.el (org-footnote-at-reference-p): Remove reference
to `org-protected'.
* lisp/org-capture.el (org-capture-fill-template): Remove reference to
`org-protected'.
* contrib/lisp/org-wikinodes.el (org-wikinodes-process-links-for-export):
Remove reference to `org-protected' value.
These text properties were used by the old export framework. They are
not needed anymore.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Renamed from
`org-export-blocks-preprocess'.
* lisp/ox.el (org-export-execute-babel-code): Apply previous renaming.
* testing/org-test.el (org-test-at-id): Make sure the function returns
the value of the last form in its body.
* testing/lisp/test-ob-exp.el: Fix tests.
* testing/lisp/test-ob-lob.el: Fix tests.
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option): Collect
valid keywords for completion without requiring the whole export
framework.
(pcomplete/org-mode/file-option/options): Rewrite using new export
framework. Only complete up to the colon.
(pcomplete/org-mode/file-option/x): Removed macro.
(pcomplete/org-mode/file-option/title,
pcomplete/org-mode/file-option/author,
pcomplete/org-mode/file-option/email,
pcomplete/org-mode/file-option/date): Removed functions.
(pcomplete/org-mode/file-option/infojs_opt): New function.
Completion for some keywords was removed because it provided only the
default value, which is the same as not writing the keyword at all. In
other words, a user would almost always want to modify the completed
value, which makes the completion moot.
* lisp/org-clock.el (org-clocktable-defaults,
org-clocktable-write-default): Avoid requiring the whole export
framework just to check one variable.
* lisp/org-footnote.el (org-footnote-section): Update
docstring.
(org-footnote-normalize): Remove all export related part from the
function.
* lisp/org-inlinetask.el (org-inlinetask-export,
org-inlinetask-export-templates): Removed variables.
(org-inlinetask-export-handler): Removed function.
* lisp/org-plot.el: Remove dependency on `org-exp' library.
* lisp/org.el (org-additional-option-like-keywords): Remove variable.
(org-get-export-keywords): New function.
(org-options-keywords): Update default list of keywords.
(org-remove-flyspell-overlays-in): Apply changes to keywords
compilation.
(org-highlight-latex-fragments-and-specials)
org-latex-and-specials-regexp,
org-export-html-special-string-regexps): Remove variables.
(org-compute-latex-and-specials-regexp,
org-do-latex-and-special-faces, org-remove-file-link-modifiers):
Remove functions.
(org-set-regexps-and-options, org-set-font-lock-defaults): Apply all
removals.
(org-use-sub-superscripts): Fix docstring. Remove unused group.
(org-match-sexp-depth): Make it a defconst instead of a defcustom in
order to remove `org-export-translation' group completely.
The new export framework shouldn't be as much interleaved with Org
core as with the previous one. For example, export options, which are
back-end dependent, shouldn't interfere with the display of the
buffer.
* contrib/lisp/org-mime.el (org-mime-htmlize, org-mime-compose): Use
new exporter.
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new
exporter.
* lisp/ob-latex.el (org-babel-execute:latex): Use new exporter.
* lisp/ob-org.el (org-babel-execute:org): Use new exporter.
* lisp/org-agenda.el (org-agenda-menu, org-agenda-write): Use new
iCalendar export back-end.
* lisp/org-table.el (org-table-export, orgtbl-export): Remove
dependency on `org-exp' library.
(org-table-clean-before-export): New function.
(org-table-colgroup-info): New variable.
(orgtbl-to-html): Use to new HTML export back-end.
* lisp/org.el (org-modules): Remove modules relative to obsolete
export framework and add those relative to the new one.
(org-create-formula-image-with-dvipng, org-format-latex
org-create-formula-image-with-imagemagick): Use new exporter.
(org-indent-line): INCLUDE keywords are indented like regular
keywords.
(org-mode-map): Bind C-c C-e to new export dispatcher.
(org-menu): Install new exporter in menu.
* org-agenda.el (org-agenda-max-entries)
(org-agenda-max-todos, org-agenda-max-tags)
(org-agenda-max-effort): New options.
(org-timeline, org-agenda-list, org-search-view)
(org-todo-list, org-tags-view): Tell
`org-agenda-finalize-entries' what agenda type we are
currently finalizing for.
(org-agenda-finalize-entries): Limit the number of entries
depending on the new options.
(org-agenda-limit-entries): New function.
Thanks to the various people who asked for this feature
or for a variation of it.
You can set the new options to an integer or to an alist.
(setq org-agenda-max-effort 120)
=> Don't display entries beyond 120 minutes of effort
(setq org-agenda-max-effort '((todo . 60) (agenda . 240)))
=> Limit to 60 minutes in TODO agenda and to 240 in
"agenda" agenda views.
* org.el (org-deadline): Allow a double universal prefix
argument to insert/update a warning cookie.
(org-deadline): Allow a double universal prefix argument to
insert/update a delay cookie.
* org-agenda.el (org-agenda-skip-scheduled-delay-if-deadline):
New option. The structure of the possible values is copied
from `org-agenda-skip-deadline-prewarning-if-scheduled'.
(org-agenda-get-scheduled): Honor the two new option,
`org-scheduled-delay-days' and
`org-agenda-skip-deadline-prewarning-if-scheduled'. I.e. if a
scheduled entry has a delay cookie like "-2d" (similar to the
prewarning cookie for deadline), don't show the entry until
needed.
* org.el (org-deadline-warning-days): Small docstring fix.
(org-scheduled-delay-days): New option (see
`org-deadline-warning-days'.)
(org-get-wdays): Use the new option.
Thanks to Andrew M. Nuxoll and Michael Brand for this idea.
You can now use a "delay cookie" in scheduled items. For example,
* TODO Sleep
SCHEDULED: <2013-02-06 mer. -3d>
will not be shown on 06/02 but on 09/02, three days later.
The value of the cookie overrides any value of `org-scheduled-delay-days',
unless `org-scheduled-delay-days' is negative (same logic than for
`org-deadline-warning-days'.)
Also check org-agenda-skip-scheduled-delay-if-deadline, which does for
delay cookies what `org-agenda-skip-deadline-prewarning-if-scheduled' does
for prewarning deadline cookies.
* org-agenda.el (org-agenda-sorting-strategy): Document the
new sorting strategies.
(org-agenda-get-todos, org-agenda-get-timestamps)
(org-agenda-get-deadlines, org-agenda-get-scheduled): Add a
`ts-date' text property with scheduled, deadline or timetamp
date.
(org-cmp-ts): New function to compare timestamps.
(org-em): Add a docstring.
(org-entries-lessp): Use `org-cmp-ts' to compare timestamps.
Implement the following sorting strategies: timestamp-up/down,
scheduled-up/down, deadline-up/down, ts-up/down (for active
timestamps) and tsia-up/down (for inactive timestamps.)
* org-agenda.el (org-agenda-get-deadlines)
(org-agenda-get-scheduled): Fix bug: use text properties for
the headline text since we rely on properties to get e.g. the
effort.