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.

Reply via email to