|
@@ -8845,15 +8845,14 @@ with the original repeater."
|
|
|
|
|
|
;;; Outline Sorting
|
|
;;; Outline Sorting
|
|
|
|
|
|
-(defun org-sort (with-case)
|
|
|
|
|
|
+(defun org-sort (&optional with-case)
|
|
"Call `org-sort-entries', `org-table-sort-lines' or `org-sort-list'.
|
|
"Call `org-sort-entries', `org-table-sort-lines' or `org-sort-list'.
|
|
Optional argument WITH-CASE means sort case-sensitively."
|
|
Optional argument WITH-CASE means sort case-sensitively."
|
|
(interactive "P")
|
|
(interactive "P")
|
|
- (cond
|
|
|
|
- ((org-at-table-p) (org-call-with-arg 'org-table-sort-lines with-case))
|
|
|
|
- ((org-at-item-p) (org-call-with-arg 'org-sort-list with-case))
|
|
|
|
- (t
|
|
|
|
- (org-call-with-arg 'org-sort-entries with-case))))
|
|
|
|
|
|
+ (funcall (cond ((org-at-table-p) #'org-table-sort-lines)
|
|
|
|
+ ((org-at-item-p) #'org-sort-list)
|
|
|
|
+ (t #'org-sort-entries))
|
|
|
|
+ with-case))
|
|
|
|
|
|
(defun org-sort-remove-invisible (s)
|
|
(defun org-sort-remove-invisible (s)
|
|
"Remove invisible part of links and emphasis markers from string S."
|
|
"Remove invisible part of links and emphasis markers from string S."
|