emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug Emacs 21.3: write-file downcasing


From: Stefan Monnier
Subject: Re: Bug Emacs 21.3: write-file downcasing
Date: Fri, 07 Feb 2003 12:57:34 -0500

> > 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]