From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Bug Emacs 21.3: write-file downcasing Date: Fri, 07 Feb 2003 12:57:34 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200302071757.h17HvYH06011@rum.cs.yale.edu> References: <20030207163850.3779.LEKTU@terra.es> <2110-Fri07Feb2003191658+0200-eliz@is.elta.co.il> <20030207182150.377E.LEKTU@terra.es> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044640589 16266 80.91.224.249 (7 Feb 2003 17:56:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 7 Feb 2003 17:56:29 +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 18hCjg-0004E0-00 for ; Fri, 07 Feb 2003 18:56:24 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18hCtK-00076E-00 for ; Fri, 07 Feb 2003 19:06:22 +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 18hClC-0004Q7-03 for emacs-devel@quimby.gnus.org; Fri, 07 Feb 2003 12:57:58 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18hCkz-0004Oc-00 for emacs-devel@gnu.org; Fri, 07 Feb 2003 12:57:45 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18hCkx-0004NN-00 for emacs-devel@gnu.org; Fri, 07 Feb 2003 12:57:43 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18hCks-0004MD-00; Fri, 07 Feb 2003 12:57:38 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id h17HvYH06011; Fri, 7 Feb 2003 12:57:34 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Juanma Barranquero Original-cc: Eli Zaretskii Original-cc: seagull@fastmail.fm Original-cc: emacs-pretest-bug@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:11480 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11480 > > What am I missing? > > Nothing, except that we aren't downcasing the filename, we are > normalizing it :) > > What I mean is that: > > (with-current-buffer (get-buffer-create "*temp*") > (let ((name (file-truename "/file1"))) > (insert "data\n") > (write-file name) > (string= name (file-truename (buffer-file-name))))) > > => nil IMHO the problem is that we should not use `string='. We should have a `file-name-equal' predicate instead. I'm not sure what its precise semantics should be, but a first step could be something like (defun file-name-equal (f1 f2) (eq t (compare-string f1 0 nil f2 0 nil (memq system-name '(windows-nt ms-dos))))) -- Stefan