From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: oscarfv@telefonica.net (=?UTF-8?Q?=C3=93scar?= Fuentes) Newsgroups: gmane.emacs.bugs Subject: bug#23902: 25.1.50; Strange warning on string-collate-equalp's docstring Date: Sat, 09 Jul 2016 23:36:37 +0200 Message-ID: <87eg72cx3u.fsf@wanadoo.es> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1468100249 11329 80.91.229.3 (9 Jul 2016 21:37:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jul 2016 21:37:29 +0000 (UTC) Cc: michael_heerdegen@web.de, 23902@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 09 23:37:17 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 1bLzw4-0002ER-8h for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2016 23:37:16 +0200 Original-Received: from localhost ([::1]:52483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLzw0-0002WI-2y for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2016 17:37:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLzvu-0002WC-Oa for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 17:37:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLzvq-00013l-Ku for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 17:37:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLzvq-00013h-HI for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 17:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLzvq-0002n7-Ck for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 17:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: oscarfv@telefonica.net (=?UTF-8?Q?=C3=93scar?= Fuentes) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jul 2016 21:37: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.146810020810707 (code B ref 23902); Sat, 09 Jul 2016 21:37:02 +0000 Original-Received: (at 23902) by debbugs.gnu.org; 9 Jul 2016 21:36:48 +0000 Original-Received: from localhost ([127.0.0.1]:44423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLzvc-0002mc-6P for submit@debbugs.gnu.org; Sat, 09 Jul 2016 17:36:48 -0400 Original-Received: from relaycp01.dominioabsoluto.net ([217.116.26.68]:57137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLzvZ-0002mN-E4 for 23902@debbugs.gnu.org; Sat, 09 Jul 2016 17:36:46 -0400 Original-Received: from smtp.movistar.es (smtp10.acens.net [86.109.99.134]) by relaycp01.dominioabsoluto.net (Postfix) with ESMTP id 353B6429C; Sat, 9 Jul 2016 23:36:38 +0200 (CEST) X-CTCH-RefID: str=0001.0A0B0208.57816E66.0017, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Original-Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 5746394E02367B6F; Sat, 9 Jul 2016 21:36:39 +0000 In-Reply-To: <83shvig21e.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Jul 2016 20:21:49 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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:120721 Archived-At: 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. Anyway, saying "don't use this for comparing file names" is cryptic. Mentioning file-equal-p would be helpful if you insist on mentioning file names on the docstring of string-collate-equalp. >> 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. Maybe the user wishes to find a file with a given name, modulo collation. Search for "tu.txt" and find "t=C3=BA.txt".