Add a COMPARE-FUNC argument to the internal sorting routine.
Patch by John Wiegley.
This commit is contained in:
parent
2075b26a92
commit
f796043bf1
|
@ -1,5 +1,8 @@
|
|||
2008-12-18 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-sort-entries-or-items): Add a COMPARE-FUNC
|
||||
argument.
|
||||
|
||||
* org-agenda.el (org-agenda-set-tags): Leave getting the tags to
|
||||
`org-agenda-change-all-lines'.
|
||||
(org-agenda-change-all-lines): Removed FORCE-TAGS argument, the
|
||||
|
|
|
@ -5434,7 +5434,8 @@ Optional argument WITH-CASE means sort case-sensitively."
|
|||
|
||||
(defvar org-priority-regexp) ; defined later in the file
|
||||
|
||||
(defun org-sort-entries-or-items (&optional with-case sorting-type getkey-func property)
|
||||
(defun org-sort-entries-or-items
|
||||
(&optional with-case sorting-type getkey-func compare-func property)
|
||||
"Sort entries on a certain level of an outline tree.
|
||||
If there is an active region, the entries in the region are sorted.
|
||||
Else, if the cursor is before the first entry, sort the top-level items.
|
||||
|
@ -5614,6 +5615,7 @@ WITH-CASE, the sorting considers case as well."
|
|||
(cond
|
||||
((= dcst ?a) 'string<)
|
||||
((= dcst ?t) 'time-less-p)
|
||||
((= dcst ?f) compare-func)
|
||||
(t nil)))))
|
||||
(message "Sorting entries...done")))
|
||||
|
||||
|
|
Loading…
Reference in New Issue