unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: Juanma Barranquero <lekktu@gmail.com>, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: find-library-name fails if file (with no extension) exists.
Date: Wed, 22 Nov 2006 02:04:58 +0100	[thread overview]
Message-ID: <85zmakwath.fsf@lola.goethe.zz> (raw)
In-Reply-To: <4563A0E3.9050103@student.lu.se> (Lennart Borgman's message of "Wed\, 22 Nov 2006 01\:59\:15 +0100")

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> David Kastrup wrote:
>> Lennart Borgman <lennart.borgman.073@student.lu.se> 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	other threads:[~2006-11-22  1:04 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-21 16:22 find-library-name fails if file (with no extension) exists Juanma Barranquero
2006-11-21 18:24 ` Romain Francoise
2006-11-21 19:09   ` Juanma Barranquero
2006-11-21 20:07     ` Romain Francoise
2006-11-21 21:58       ` Juanma Barranquero
2006-11-22  7:28         ` Romain Francoise
2006-11-22 12:14           ` Juanma Barranquero
2006-11-22 12:35             ` Juanma Barranquero
2006-11-22 13:54             ` Romain Francoise
     [not found]               ` <f7ccd24b0611220644m1d8944dq5943175c347cde3e@mail.gmail.com>
2006-11-22 19:34                 ` Juanma Barranquero
2006-11-22 19:47                   ` Romain Francoise
2006-11-22 20:33                     ` Lennart Borgman
2006-11-22 21:02                       ` Juanma Barranquero
2006-11-21 20:07     ` Eli Zaretskii
2006-11-21 20:47     ` Andreas Schwab
2006-11-21 21:04       ` Lennart Borgman
2006-11-21 21:47       ` Juanma Barranquero
2006-11-21 21:48         ` Juanma Barranquero
2006-11-21 22:23         ` David Kastrup
2006-11-21 22:57           ` Juanma Barranquero
2006-11-21 23:19             ` David Kastrup
2006-11-21 23:25               ` Lennart Borgman
2006-11-21 23:33                 ` David Kastrup
2006-11-21 23:36                   ` Juanma Barranquero
2006-11-22  0:16                   ` Lennart Borgman
2006-11-22  0:47                     ` David Kastrup
2006-11-22  0:59                       ` Lennart Borgman
2006-11-22  1:04                         ` David Kastrup [this message]
2006-11-22  1:27                           ` Lennart Borgman
2006-11-22  1:56                             ` David Kastrup
2006-11-22  4:25                           ` Eli Zaretskii
2006-11-22  9:37                             ` Juanma Barranquero
2006-11-22 10:05                             ` David Kastrup
2006-11-22 18:44                               ` Eli Zaretskii
2006-11-22  4:22                       ` Eli Zaretskii
2006-11-22 10:03                         ` David Kastrup
2006-11-22 12:07                           ` Lennart Borgman
2006-11-22 12:46                             ` David Kastrup
2006-11-22 21:56                               ` Eli Zaretskii
2006-11-22 22:06                                 ` David Kastrup
2006-11-22 22:33                                   ` Eli Zaretskii
2006-11-23 19:47                                     ` Jan Djärv
2006-11-22 18:40                           ` Eli Zaretskii
2006-11-22 19:13                             ` David Kastrup
2006-11-22 22:04                               ` Eli Zaretskii
2006-11-22  4:17                   ` Eli Zaretskii
2006-11-21 23:34               ` Juanma Barranquero
2006-11-21 23:52                 ` David Kastrup
2006-11-22  0:01                   ` Juanma Barranquero
2006-11-22  0:34                     ` David Kastrup
2006-11-22  0:38                       ` Juanma Barranquero
2006-11-22  9:53                       ` Andreas Schwab
2006-11-22  4:14               ` Eli Zaretskii
2006-11-22  9:53                 ` David Kastrup
2006-11-22 18:38                   ` Eli Zaretskii
2006-11-22 19:27                     ` David Kastrup
2006-11-22 22:09                       ` Eli Zaretskii
2006-11-22 22:18                         ` David Kastrup
2006-11-22 13:16             ` Richard Stallman
2006-11-22 14:48               ` Juanma Barranquero
2006-11-24 22:49                 ` Richard Stallman
2006-11-22  4:10           ` Eli Zaretskii
2006-11-22  9:35             ` David Kastrup
2006-11-22 18:43               ` Eli Zaretskii
2006-11-22 19:25                 ` David Kastrup
2006-11-27 19:32               ` Stuart D. Herring
2006-11-27 19:06             ` Stuart D. Herring
2006-11-28 19:19               ` Eli Zaretskii
2006-11-21 20:06   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85zmakwath.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).