GNU bug report logs - #23902
25.1.50; Strange warning on string-collate-equalp's docstring

Previous Next

Package: emacs;

Reported by: oscarfv <at> telefonica.net (Óscar Fuentes)

Date: Tue, 5 Jul 2016 22:07:01 UTC

Severity: minor

Found in version 25.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 23902 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Óscar Fuentes <oscarfv <at> telefonica.net>,
 23902 <at> debbugs.gnu.org
Subject: Re: bug#23902: 25.1.50;
 Strange warning on string-collate-equalp's docstring
Date: Wed, 06 Jul 2016 17:08:25 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> As with any such notes in doc strings, we warn about popular mistakes
> that people make frequently.  Trying to compare file names using this
> function is such a mistake.  Any string that is actually a kind of
> handle to a system object, for which the system itself uses binary
> comparison, will do as an example of such a mistake, but doing that
> with file names is a common enough example to warrant mentioning.

I also have trouble to understand.  How can I compare file names modulo
collate-equality, if not with this function?

> > And then, how one is supposed to use an
> > equality predicate for sorting? (We have string-collate-lessp for that)
>
> A sorting algorithm can have its own ideas what to do when
> string-collate-lessp returns zero.

But we are speaking about the docstring of `string-collate-equal-p'.  It
is not clear here how it (as an equivalence predicate) could be useful
for sorting at all.


Michael.




This bug report was last modified 8 years and 313 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.