Fix alphabetic sorting for tables, plain lists
* org-table.el (org-table-sort-lines): Use collated sorting.
* org-list.el (org-sort-list): Use collated sorting.
Cf. commit 551d2f1fe
.
This commit is contained in:
parent
258996a9a6
commit
e64ff15f67
|
@ -106,6 +106,12 @@ document, use =shrink= value instead, or in addition to align:
|
||||||
,#+STARTUP: align shrink
|
,#+STARTUP: align shrink
|
||||||
#+END_EXAMPLE
|
#+END_EXAMPLE
|
||||||
|
|
||||||
|
*** Alphabetic sorting in tables and lists
|
||||||
|
|
||||||
|
When sorting alphabetically, ~org-table-sort-lines~ and ~org-sort-list~
|
||||||
|
now sort according to the locale’s collation rules instead of by
|
||||||
|
code-point.
|
||||||
|
|
||||||
** New features
|
** New features
|
||||||
*** Add support for links to LaTeX equations in HTML export
|
*** Add support for links to LaTeX equations in HTML export
|
||||||
Use MathJax links when enabled (by ~org-html-with-latex~), otherwise
|
Use MathJax links when enabled (by ~org-html-with-latex~), otherwise
|
||||||
|
|
|
@ -2804,7 +2804,8 @@ Sorting can be alphabetically, numerically, by date/time as given
|
||||||
by a time stamp, by a property or by priority.
|
by a time stamp, by a property or by priority.
|
||||||
|
|
||||||
Comparing entries ignores case by default. However, with an
|
Comparing entries ignores case by default. However, with an
|
||||||
optional argument WITH-CASE, the sorting considers case as well.
|
optional argument WITH-CASE, the sorting considers case as well,
|
||||||
|
if the current locale allows for it.
|
||||||
|
|
||||||
The command prompts for the sorting type unless it has been given
|
The command prompts for the sorting type unless it has been given
|
||||||
to the function through the SORTING-TYPE argument, which needs to
|
to the function through the SORTING-TYPE argument, which needs to
|
||||||
|
@ -2850,7 +2851,7 @@ function is being called interactively."
|
||||||
(error "Missing key extractor"))))
|
(error "Missing key extractor"))))
|
||||||
(sort-func
|
(sort-func
|
||||||
(cond
|
(cond
|
||||||
((= dcst ?a) #'string<)
|
((= dcst ?a) #'org-string-collate-lessp)
|
||||||
((= dcst ?f)
|
((= dcst ?f)
|
||||||
(or compare-func
|
(or compare-func
|
||||||
(and interactive?
|
(and interactive?
|
||||||
|
|
|
@ -1794,7 +1794,7 @@ function is being called interactively."
|
||||||
(predicate
|
(predicate
|
||||||
(cl-case sorting-type
|
(cl-case sorting-type
|
||||||
((?n ?N ?t ?T) #'<)
|
((?n ?N ?t ?T) #'<)
|
||||||
((?a ?A) #'string<)
|
((?a ?A) #'org-string-collate-lessp)
|
||||||
((?f ?F)
|
((?f ?F)
|
||||||
(or compare-func
|
(or compare-func
|
||||||
(and interactive?
|
(and interactive?
|
||||||
|
|
Loading…
Reference in New Issue