www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/05/14:05:41

Message-Id: <m0yWhpI-000S3nC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp AT delorie DOT com
Date: Tue, 5 May 1998 10:40:00 +0000
MIME-Version: 1.0
Subject: Re: fixpath problem in Novell drives.
References: <m0yWgfW-000S3nC AT inti DOT gov DOT ar>
In-reply-to: <Pine.SUN.3.91.980505155418.28653B-100000@is>

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
> On Tue, 5 May 1998, Salvador Eduardo Tropea (SET) wrote:
> 
> > Suppose the user enters it in the save window: c:\long_name.txtt
> > and I'm in a non LFN system, when I pass it to fopen it works OK and creates a 
> > file long_nam.txt. The user sees in the window caption the fake name (the one 
> > he specified).
> 
> Oh, I see.  Sure, this problem happens in Emacs as well, and there are a 
> couple of user options to handle it.
> 
> First, depending on the point of view, this can be a feature: sometimes 
> it is actually good to have the editor obey the name the user types.  For 
> example, if the editor enters a special editing mode given the file's 
> extension, then e.g. "foo.java" will correctly invoke the Java mode even 
> though the file is actually called "foo.jav" on DOS.  So it is not 
> necessarily bad that the file name editor thinks is being edited is 
> different from the actual name. 

That's an interesting case.

>  This situation is the default in Emacs, 
> and I find it quite reasonable.  Given that the editor itself can know 
> (using `stat') that two files are actually the same file, it is only a 
> matter of user preference.  If the user tries to open the same file under 
> a different name, you just tell them that the file is already open under 
> the other name and don't let them open it again.

Yes that what I was thinking about.
 
> Then there's a possibility that the user would like to actually see the 
> true name of the file.  For that, you indeed need to use _truename.  I 
> don't think displaying the name _truename returns is bad in this case: 
> after all, that's what the user wanted.  You could down-case it when LFN 
> is off, but what's wrong with backslashes?

Nothing, is just that the result is a little confusing (all the rest in the 
editor is forward slash).
 
> Btw, Emacs also has an option to let the user open the same file more 
> than once under different names, if the user wants.  Emacs can tolerate 
> this because it doesn't keep the file open: once it is read into memory, 
> it is closed.

I close the file too. 

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019