From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Bug Emacs 21.3: write-file downcasing Date: 12 Feb 2003 11:26:10 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xwuk5ssl9.fsf@kfs2.cua.dk> References: <20030207163850.3779.LEKTU@terra.es> <2110-Fri07Feb2003191658+0200-eliz@is.elta.co.il> <20030207182150.377E.LEKTU@terra.es> <2593-Fri07Feb2003201921+0200-eliz@is.elta.co.il> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1045041974 28131 80.91.224.249 (12 Feb 2003 09:26:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 12 Feb 2003 09:26:14 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18it9U-0007Iz-00 for ; Wed, 12 Feb 2003 10:26:00 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18itLO-0005Gh-00 for ; Wed, 12 Feb 2003 10:38:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18itBc-0003NS-02 for emacs-devel@quimby.gnus.org; Wed, 12 Feb 2003 04:28:12 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18itBB-0003IF-00 for emacs-devel@gnu.org; Wed, 12 Feb 2003 04:27:45 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18itAa-0002u3-00 for emacs-devel@gnu.org; Wed, 12 Feb 2003 04:27:08 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18itAX-0002ra-00; Wed, 12 Feb 2003 04:27:05 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id 6270A7C017; Wed, 12 Feb 2003 10:27:01 +0100 (CET) Original-To: Jason Rumney In-Reply-To: Original-Lines: 34 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-cc: rms@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11583 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11583 Jason Rumney writes: > Richard Stallman writes: > > > That adds to the weight of the need. Still, I would much rather > > we could avoid the need to compare file names using anything other > > than string=. > > Even on GNU and similar systems, it is probably better to compare > inodes than strings to determine if two files are the same file. > That would deal with case-insensitive filesystems where they exist on > those platforms. > > There are already places in the Emacs code where inodes are used (to > deal with hard-links), making a function available for lisp to do > such a comparison and encouraging people to use it rather than string= > seems like a good thing to me. So there are really two issues here when comparing two file names A and B: 1) do A and B name the same file (could be in different directories) 2) are A and B the "same" file name, if underlaying FS is case insensitive. In case 1), comparing inodes (when available) will be the correct solution. In case 2), just comparing inodes doesn't help. Furthermore, if the file hasn't been created yet, you cannot use inodes to compare names A and B... -- Kim F. Storm http://www.cua.dk