Subject: bug#71307: Mention recommended styles

From: Dan Jacobson <[email-masked]>
Date: Sat, 01 Jun 2024 19:37:59 +0800

(info "(coreutils) sort invocation")

First problem. We see e.g.,
"try the ‘--debug’ option"
but '--debug' is not clickable.
If we want to go to its section to read more,
the best we can do is isearch-forward for it.

Next problem. We read

     Also note that the ‘n’ modifier was applied to the field-end
     specifier for the first key. It would have been equivalent to
     specify ‘-k 2n,2’ or ‘-k 2n,2n’. All modifiers except ‘b’ apply to
     the associated _field_, regardless of whether the modifier
     character is attached to the field-start and/or the field-end part
     of the key specifier.

Make sure to mention the recommended style, yes, even though both work
the same.

In fact the style shown all over the page 2,2n isn't the best! I think
you should change all the examples to 2n,2.

Why? Well, think about it, for say 2,5n.. We instruct you to start at
field 2, then go to field 5, and only then do we remember to tell you we
want our sort to be numeric. Sure, the program waits until it gets all
the facts before proceeding. But internally it is actually doing 2n and
then 5, no matter what we gave it, so in fact allowing people to write
2,5n is just an unfortunate choice that now must be grandfathered along
not to break scripts. What's so bad about it? Well one day the program
could have been made even a tiny bit faster by not needing the extra
step of cleaning up for loose input standards.

Anyway just like we specify our meals and seat preferences before
stepping on the plane, and not when getting off, the 2n,2 2n,5 style is
better to recommend.

Coreutils 9.4.