[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sort-lines including non ASCII

From: Michael Heerdegen
Subject: Re: sort-lines including non ASCII
Date: Thu, 07 Jul 2016 19:32:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> Maybe if we figure out how to allow this in interactive usage, we can
> pass that bit down?  And if worse comes to worst, perhaps a separate
> command is in order, which uses collation by default?

Since `sort-lines' calls `sort-subr' with a fixed second and third
argument, I guess we can assume that the key type the predicate must
accept is always the same: (#1=(beg . end) . #1#).  It would be nice if
`sort-lines' as a function would at least accept an arbitrary predicate,
and we transform it to accept the correct key type and pass it to
`sort-subr', so that `string-collate-lessp' would work as PREDICATE

BTW, a relevant question is: Is `compare-buffer-substring' faster than

I've no strong opinion about the command usage.  I would even find it
acceptable to leave it as is and force the user to call the thing as a
function with M-:, since a lambda as predicate might also be useful
quite often.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]