emacs-devel
[Top][All Lists]
Advanced

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

Re: find-library-name fails if file (with no extension) exists.


From: David Kastrup
Subject: Re: find-library-name fails if file (with no extension) exists.
Date: Wed, 22 Nov 2006 02:04:58 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux)

Lennart Borgman <address@hidden> writes:

> David Kastrup wrote:
>> Lennart Borgman <address@hidden> writes:
>>
>>> David Kastrup wrote:
>>>
>>>> It is not even possible to write code with a reasonable chance of
>>>> working reliably since one can have Windows and Unix file systems on
>>>> the same system and export either with Samba or NFS or a number of
>>>> other ways.
>>> If (a very big IF perhaps) Samba, NFS etc preserves the case of file
>>> names in each export and the software is written with the possibility
>>> of both case sensitive and case insensitive file systems in mind it
>>> seems possible to me.
>>>
>>> Or am I missing something there?
>>
>> You can't decide that two file names might indicate the same file
>> without doing an actual file operation.  You can't decide whether
>> writing a file would conflict with an existing file without
>> actually doing the write (and asking the operating system to fail
>> in case the file exists).  You can't really base any decision on
>> existing file names.  As a rule of thumb, if there is a possibility
>> for a race condition, there is a possibility for filename aliasing
>> trouble.  And not every potential race condition is a problem.
>>
>> Things like file name completion are simply something which is
>> impossible to get right.
>
> But does not that depend on the use of file names? If file names are
> choosen so that they work on both case insensitive and case
> sensitive system are there then any problems?

If you use only lowercase filenames (for some reasonable definition of
lowercase), you'll not run into trouble.  But the whole point of case
insensitity is to encourage using mixed case filenames.

> At least that has been the problem in the cases I have seen. Most
> often the problem has actually been that someone writing on a case
> sensitive file system forgot to take care of this. (That is of
> course an easy mistake to make.)

How are you going to figure out whether a given directory is in
load-path?

> I am aware of the cases you mentioned to Juanma where there really
> are no way to do lowercase/uppercase certain letters. Could not they
> be handled (and are they not already handled) as different letters
> even though they outside the computer world may look at
> uppercase/lowercase variants of the same letter?

The problem is that "case sensitivity" requires a notion of "identical
except for case", and it is hardly to be expected that every
application has string manipulation functions that will have exactly
the same idea concerning "identical except for case" as the operating
system will have with regard to file names, in particular once we are
leaving the area of 7-bit ASCII.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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