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: Sun, 10 Jul 2016 05:40:25 +0300 Message-ID: <83oa66fc6e.fsf@gnu.org> References: <87vb0jeo56.fsf@telefonica.net> <831t36omxx.fsf@gnu.org> <87bn2aolcm.fsf@web.de> <83inwin5uu.fsf@gnu.org> <87oa6aepls.fsf@wanadoo.es> <838txen363.fsf@gnu.org> <83shvig21e.fsf@gnu.org> <87eg72cx3u.fsf@wanadoo.es> 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 1468118495 21033 80.91.229.3 (10 Jul 2016 02:41:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2016 02:41:35 +0000 (UTC) Cc: michael_heerdegen@web.de, 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 Sun Jul 10 04:41:20 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 1bM4gG-0005fE-Qm for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 04:41:16 +0200 Original-Received: from localhost ([::1]:53136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bM4gF-0000aI-S6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2016 22:41:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bM4g8-0000aA-En for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 22:41:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bM4g2-0003gH-HP for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 22:41:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bM4g2-0003gD-ER for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 22:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bM4g2-0001Qz-9F for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 22:41: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: Sun, 10 Jul 2016 02:41: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.14681184465482 (code B ref 23902); Sun, 10 Jul 2016 02:41:02 +0000 Original-Received: (at 23902) by debbugs.gnu.org; 10 Jul 2016 02:40:46 +0000 Original-Received: from localhost ([127.0.0.1]:44544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bM4fm-0001QM-Dp for submit@debbugs.gnu.org; Sat, 09 Jul 2016 22:40:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bM4fj-0001Q9-CO for 23902@debbugs.gnu.org; Sat, 09 Jul 2016 22:40:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bM4fZ-0003Vq-Ir for 23902@debbugs.gnu.org; Sat, 09 Jul 2016 22:40:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bM4fZ-0003Up-6U; Sat, 09 Jul 2016 22:40:33 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2502 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bM4fW-0004Bk-Tf; Sat, 09 Jul 2016 22:40:31 -0400 In-reply-to: <87eg72cx3u.fsf@wanadoo.es> (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:120735 Archived-At: > From: oscarfv@telefonica.net (Óscar Fuentes) > Cc: Glenn Morris , michael_heerdegen@web.de, 23902@debbugs.gnu.org > Date: Sat, 09 Jul 2016 23:36:37 +0200 > > Eli Zaretskii writes: > > > But they can reason this way instead: > > > > "I want to compare two file names. > > Collation is a way to compare strings, for example the man page for > > strcoll says the function returns zero if one string is equal to the > > other. > > And Emacs just learned how to use collation to compare strings, it > > has this great new function string-collate-equalp. > > Therefore, let's use string-collate-equalp for comparing two file > > names." > > This implies that the user knows about string comparisons with collation > but he is a complete ignoramus about file systems. A bit unrealistic. I'm not sure. People might know a lot about strings, but not how the filesystem stores file names. > >> And suppose I have two strings, and want to know if they are equal, > >> respecting my locale's convention about characters that are not > >> literally identical, but have the same meaning. I should use > >> string-collate-equalp for this. This is true whether the strings > >> represent the names of elephants in a zoo, or files on a disk. > > > > And that is exactly the fallacy that the note warns against. Because > > filesystems don't compare as equal characters that have the same > > meaning, they compare bytes in a byte stream that is the file name in > > its raw byte form, as recorded on disk. > > I think that Glenn is saying that you can compare file names for other > purposes than knowing if they name the same file. Then it's not "equality", it's "equivalence".