* org.el (org-sort-entries): Use collated sorting.
(org-tags-sort-function): Use collated sorting.
(org-string-collate-greaterp): Add helper-function to use as defcustom
option, since there is no ‘string-collate-greaterp’ in Emacs.
* org-compat.el (org-string-collate-lessp): Add proxy to fall-back on
string-lessp when string-collate-lessp is missing (Emacs ≤ 24).
* test-org.el (test-org/string-collate-lessp): Add test.
(test-org/sort-entries): Add regression test for non-ASCII inputs.
‘org-sort-entries’ and ‘org-tags-sort-function’ advertise alphabetic
sorting, but actually sort based only on character code. This
produces non-alphabetic orderings of strings in non-ASCII locales.
E. g., German Umlauts “Ä Ü Ö” are alphabetically sorted as if they
were “A U O”, whereas sorting based on character-code will place them
after “Z”, which is unexpected.
* lisp/org-compat.el (org-calendar-to-agenda-key):
(org-calendar-insert-diary-entry-key): Moved from "org.el".
(org--setup-calendar-bindings): New function.
Fixes: Bug#10289
* lisp/org.el (org-timestamp-to-time): New function.
(org-timestamp--to-internal-time): Remove function.
(org-timestamp-format): Use new function.
* testing/lisp/test-org.el (test-org/timestamp-to-time): New test.
* lisp/org-table.el (org-table-insert-column): Insert new column to
the right instead of the left.
* testing/lisp/test-org-table.el (test-org-table/insert-column): New
test.
* lisp/org.el (org-insert-structure-template): New function for
wrapping region (or element at point) in a begin/end block.
(org-structure-predefined-blocks): New option holding predefined
blocks, for completion.
(org-try-structure-completion,
org-complete-expand-structure-template): Remove functions.
* doc/org.texi (Inserting structure templates): Document.
* testing/lisp/test-org.el (test-org/insert-template): New test.
* lisp/ob-core.el (org-babel-use-quick-and-dirty-noweb-expansion):
Remove variable.
(org-babel-expand-noweb-references): Update function.
* doc/org.texi (noweb-ref): Document new behaviour.
(Noweb reference syntax): Delete reference to removed variable.
`org-babel-use-quick-and-dirty-noweb-expansion' main use is to speed
up Noweb expansion when expanding only by name. By distinguishing
name and reference expansion, we no longer need this variable. In the
first case, the expansion is quicker anyway, and in the second case,
we most certainly need an accurate expansion.
* lisp/org-colview.el (org-columns-summary-types): Allow new format.
(org-columns--summarize): Update to new summary type format.
(org-columns--collect): New function.
(org-columns--compute-spec): Apply changes.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
Add test.
In addition to (LABEL . SUMMARIZE), org-columns-summary-types now
accepts (LABEL SUMMARIZE COLLECT) entries. The new COLLECT function is
called with one argument, the property being summarized.
TINYCHANGE
* lisp/org-archive.el (org-archive-subtree): Update todo statistics
when calling `org-archive-subtree'.
(org-archive-to-archive-sibling): Update cookie statistics when
calling `org-archive-to-archive-sibling'.
* testing/lisp/test-org-archive.el: New file.
This can be disabled by setting `org-provide-todo-statistics' to nil.