midwinter wrote:That's just bizarre. I don't see a "use random logic on sort" preference anywhere.

Fortunately there's no need for such a feature, it's more than covered by a combination of the Perl sort() function and the way the "Sort Paragraphs" macros are written.
By default the Perl sort() routine orders arrays in character alphabetic order, i.e. 0-9 before a-z and A-Z. Explicit variable comparisons in Perl require the programmer to know if they're dealing with numeric values or alpha values and use the appropriate relational operators in each case (=,<,>,!= for numeric variables and eq,lt,gt,ne, etc. for alpha variables). This presents problems when you're sorting lines/paragraphs of mixed alphanumeric text as in the Sort Paragraphs case.
There is code in the macros that specifically looks for lines that begin with numbers (presumably those produced by the Add Line Numbers and Number Renumber Lines macros or similar) and tries to ensure they are first sorted numerically by those line numbers and not just alphabetically by character value as lines that don't begin with numbers are (e.g. you want 02 and 2 to compare as equal which they won't if you just compare them as character strings). Alas there seems to be a little bug here - once a leading line number is identified the sort routine proceeds to strip out
all remaining non-numeric characters in the line and initially order the line(s) based on the line numbers. If two line numbers are equal (e.g. 0 as in 0c and 0b) it then does a character comparison on the whole line. So:
0c, 0b, 0a1 sorts first on the numerics: 0,0,01 then by character on the first two lines giving 0b, 0c, 0a1. The third line is left as is because 01 is not equal to 0 and so is just ordered numerically.
The problem is that lines that begin with numbers can have other completely separate numeric values further on following some alpha chars, like 0a1 in the example, and when you strip out all non-numerics you end up concatenating separate numeric values and treating it as a line number - 0a1 becomes 01 which sorts after any 0<a-z> lines. I think what the macro should do is remove
all characters following any line number, not just non-numerics, but I haven't tried this yet.