bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21816: elisp-mode-tests fails on a case-preserving filesystem


From: Stephen Leake
Subject: bug#21816: elisp-mode-tests fails on a case-preserving filesystem
Date: Wed, 04 Nov 2015 02:28:50 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Stephen Leake <stephen_leake@stephe-leake.org>
>> Cc: Juanma Barranquero <lekktu@gmail.com>, Eli Zaretskii
>> <eliz@gnu.org>, 21816@debbugs.gnu.org
>> Date: Tue, 03 Nov 2015 16:07:00 -0600
>> 
>> Actually, file-truename works for the cases we've discussed so far:
>> 
>> (file-truename "c:/Projects/emacs/master/lisp/elide-head.el")
>> "c:/Projects/emacs/master/lisp/elide-head.el"
>> 
>> (file-truename "c:\\Projects\\emacs\\master\\lisp\\elide-head.el")
>> "c:/Projects/emacs/master/lisp/elide-head.el"
>> 
>> (file-truename "c:\\projects\\emacs\\master\\lisp\\elide-head.el")
>> "c:/Projects/emacs/master/lisp/elide-head.el"
>
> It seems to work because the part that needs caseless comparison does
> exist.  Try using it on a file name where case differences are in a
> part that doesn't exist on disk, and you will see the problem.

Right. But I think that's not a solvable problem in principle, and not
a significant one in practice. 

The only time we would worry about the canonical name for a file that
does not yet exist is when we are about to create it; why would we then
have two different names for it that need to be compared?

We might be preparing to create a list of files with similar names; in
practice, each one will be created one at a time, at which point the
canonical name is well-defined, and can be compared to the proposed
name of the next file to be created. In fact, the OS "file create" will
do that comparison for us.

Hmm; that does mean the creation could not be done in parallel threads.
Again; not a significant problem in practice.

In tests we might invent non-existing names, but that's a special case
that is easily handled by paying attention to case, or creating the
files in the test.

-- 
-- Stephe





reply via email to

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