From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23902: 25.1.50; Strange warning on string-collate-equalp's docstring Date: Wed, 06 Jul 2016 17:34:02 +0300 Message-ID: <831t36omxx.fsf@gnu.org> References: <87vb0jeo56.fsf@telefonica.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1467815785 16192 80.91.229.3 (6 Jul 2016 14:36:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2016 14:36:25 +0000 (UTC) Cc: 23902@debbugs.gnu.org To: oscarfv@telefonica.net (=?UTF-8?Q?=C3=93scar?= Fuentes) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 06 16:36:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bKnvv-0003Pb-N4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jul 2016 16:36:11 +0200 Original-Received: from localhost ([::1]:33868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKnvv-0002Lj-45 for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jul 2016 10:36:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKnuq-00080d-CI for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 10:35:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKnuo-0005Cc-BX for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 10:35:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKnuo-0005CX-8G for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 10:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bKnuo-0000it-39 for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 10:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jul 2016 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23902 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23902-submit@debbugs.gnu.org id=B23902.14678156712736 (code B ref 23902); Wed, 06 Jul 2016 14:35:02 +0000 Original-Received: (at 23902) by debbugs.gnu.org; 6 Jul 2016 14:34:31 +0000 Original-Received: from localhost ([127.0.0.1]:39626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKnuJ-0000i4-HP for submit@debbugs.gnu.org; Wed, 06 Jul 2016 10:34:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKnuH-0000hr-VE for 23902@debbugs.gnu.org; Wed, 06 Jul 2016 10:34:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKnu6-00052J-S8 for 23902@debbugs.gnu.org; Wed, 06 Jul 2016 10:34:24 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKnu6-00051w-PA; Wed, 06 Jul 2016 10:34:18 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4395 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bKnu4-0005GX-UL; Wed, 06 Jul 2016 10:34:17 -0400 In-reply-to: <87vb0jeo56.fsf@telefonica.net> (oscarfv@telefonica.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120490 Archived-At: > From: oscarfv@telefonica.net (Óscar Fuentes) > Date: Wed, 06 Jul 2016 00:05:57 +0200 > > The mentioned docstring ends with > > Do _not_ use this function to compare file names for equality, only > for sorting them. > > which makes no sense to me. First of all, what's so special about file > names to mention them here? 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. > 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. In any case, the important part here is not to use this function for file-name comparison.