[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: org-sort random
From: |
Kyle Meyer |
Subject: |
Re: org-sort random |
Date: |
Sun, 21 Nov 2021 22:12:34 -0500 |
On 11/22/21 07:40:35 +0530, Vikas Rawal wrote:
> I am trying to sort a sub-tree of headings randomly. But `C-c ^ f
> random RET` asks for a "function for comparing keys". What am I
> supposed to do?
Here's the prompt:
Function for comparing keys (empty for default `sort-subr' predicate):
And here's what sort-subr's docstring says about the behavior of the
default predicate:
If PREDICATE is nil, comparison is done with ‘<’ if
the keys are numbers, with ‘compare-buffer-substrings’ if the
keys are cons cells (the car and cdr of each cons cell are taken
as start and end positions), and with ‘string<’ otherwise.
That sounds like that should handle random's return value fine, so try
entering an empty string at that prompt.
- org-sort random, Vikas Rawal, 2021/11/21
- Re: org-sort random,
Kyle Meyer <=