From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: find-library-name fails if file (with no extension) exists. Date: Wed, 22 Nov 2006 02:04:58 +0100 Message-ID: <85zmakwath.fsf@lola.goethe.zz> References: <8764d8u085.fsf@pacem.orebokech.com> <85lkm4zbfa.fsf@lola.goethe.zz> <854pssz8u7.fsf@lola.goethe.zz> <45638B07.2090201@student.lu.se> <85wt5oxtly.fsf@lola.goethe.zz> <456396EA.9030207@student.lu.se> <857ixoxq6e.fsf@lola.goethe.zz> <4563A0E3.9050103@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1164157544 4082 80.91.229.2 (22 Nov 2006 01:05:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Nov 2006 01:05:44 +0000 (UTC) Cc: Juanma Barranquero , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 22 02:05:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GmgYR-0001I6-Sq for ged-emacs-devel@m.gmane.org; Wed, 22 Nov 2006 02:05:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmgYR-0004Kx-Fa for ged-emacs-devel@m.gmane.org; Tue, 21 Nov 2006 20:05:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GmgYB-0004Gl-PQ for emacs-devel@gnu.org; Tue, 21 Nov 2006 20:05:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GmgYA-0004Ez-Ro for emacs-devel@gnu.org; Tue, 21 Nov 2006 20:05:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmgYA-0004Em-OS for emacs-devel@gnu.org; Tue, 21 Nov 2006 20:05:18 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GmgYA-0001pL-Ds for emacs-devel@gnu.org; Tue, 21 Nov 2006 20:05:18 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.52) id 1GmgY8-0000al-Eo; Tue, 21 Nov 2006 20:05:17 -0500 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 3494A1C1E259; Wed, 22 Nov 2006 02:04:58 +0100 (CET) Original-To: Lennart Borgman In-Reply-To: <4563A0E3.9050103@student.lu.se> (Lennart Borgman's message of "Wed\, 22 Nov 2006 01\:59\:15 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:62633 Archived-At: Lennart Borgman writes: > David Kastrup wrote: >> Lennart Borgman 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