From: Aleksandr Skobelev
Subject: How to keep case in UNIX pathnames
Date: 
Message-ID: <bjqsca.8l2.ln@hermit.athome>
I have a file with a full pathname
"/home/sasha/lisp/portableaserve/INSTALL.lisp". 
When I try to work with this file using logical-pathnames under CMUCL then
capital letters in the filename are transformed into lower-case ones.
For example: 

* (translate-logical-pathname "home:lisp;portableaserve;INSTALL.lisp")
#p"/home/sasha/lisp/portableaserve/install.lisp"
* 

Is there any way to control a case conversion in this situation? 
Or, may be, what is a proper way to use logical-pathnames with mixed-case
filenames under UNIX?

-- 

From: Erik Naggum
Subject: Re: How to keep case in UNIX pathnames
Date: 
Message-ID: <3231497465354155@naggum.net>
* Aleksandr Skobelev <·········@mail.ru>
| Or, may be, what is a proper way to use logical-pathnames with mixed-case
| filenames under UNIX?

  You need to understand that the point with logical pathnames is to have a
  file-system--independent file naming convention that makes porting your
  application to a different system not require any internal changes.  This
  is a fantastically useful thing.  If Unix had had logical pathnames, Unix
  administration, setup, package installation, etc, would have been simple
  and straightforward.  Instead, we have tons of different directories that
  need to be kept in sync, and packages have compiled-in pathnames.  After
  I grokked logical pathnames, I have emulated or implemented them wherever
  I have gone.  Global file systems are simply not good at what they
  attempt to do, and hardwiring directories into programs is simply wrong.

  The mapping from logical to physical pathnames is strictly one-way.  The
  idea is to work within a known and safe universe of names and directories
  that are always portably mappable to physical pathnames.  As long as you
  live within that universe, you have solved a number of problems that are
  hard even to understand are solvable without such a (standard) mechanism.

  So you construct the logical file system with a small number of logical
  hosts and name all your files within it/them, and then arrange for the
  physical world to have the physical files and directories to which they
  are mapped.  Going the other way around is simply misguided.
-- 
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.

  70 percent of American adults do not understand the scientific process.
From: Stefan Schmiedl
Subject: Re: How to keep case in UNIX pathnames
Date: 
Message-ID: <actk1e$sjtd0$1@ID-57631.news.dfncis.de>
On Mon, 27 May 2002 14:11:15 GMT,
Erik Naggum <····@naggum.net> wrote:
> * Aleksandr Skobelev <·········@mail.ru>
>| Or, may be, what is a proper way to use logical-pathnames with mixed-case
>| filenames under UNIX?
> 
>   So you construct the logical file system with a small number of logical
>   hosts and name all your files within it/them, and then arrange for the
>   physical world to have the physical files and directories to which they
>   are mapped.  Going the other way around is simply misguided.

Does this mean that I have to rename files on Unix systems to
make them accessible to logical pathnames? Right now I am working
on a small program for "overlaying" PDF files, and it would be
highly appreciated by the customer, if the generated file can
be found under the same name, case included.

Does anyone have data on how CL implementations on Windows behave
when they are accessing Unix files stored on a Samba server?

thanks,
s.
From: Joe Marshall
Subject: Re: How to keep case in UNIX pathnames
Date: 
Message-ID: <o4tI8.1268$YV2.1183303@typhoon.ne.ipsvc.net>
"Stefan Schmiedl" <·@xss.de> wrote in message ···················@ID-57631.news.dfncis.de...
> On Mon, 27 May 2002 14:11:15 GMT,
> Erik Naggum <····@naggum.net> wrote:
> > * Aleksandr Skobelev <·········@mail.ru>
> >| Or, may be, what is a proper way to use logical-pathnames with mixed-case
> >| filenames under UNIX?
> >
> >   So you construct the logical file system with a small number of logical
> >   hosts and name all your files within it/them, and then arrange for the
> >   physical world to have the physical files and directories to which they
> >   are mapped.  Going the other way around is simply misguided.
>
> Does this mean that I have to rename files on Unix systems to
> make them accessible to logical pathnames?  Right now I am working
> on a small program for "overlaying" PDF files, and it would be
> highly appreciated by the customer if the generated file can
> be found under the same name, case included.

If you are using logical pathnames, then yes, you may have to rename
files.  Logical pathnames were not built to handle every pathname.

>
> Does anyone have data on how CL implementations on Windows behave
> when they are accessing Unix files stored on a Samba server?

A CL implementation would behave the same way any other Windows
program would behave.
From: Erik Naggum
Subject: Re: How to keep case in UNIX pathnames
Date: 
Message-ID: <3231521622770662@naggum.net>
* Stefan Schmiedl
| Does this mean that I have to rename files on Unix systems to make them
| accessible to logical pathnames? Right now I am working on a small
| program for "overlaying" PDF files, and it would be highly appreciated by
| the customer, if the generated file can be found under the same name,
| case included.

  Why are you using logical pathnames when you get input pathnames from the
  user?  What part of "one-way mapping" did you not understand?  *sigh*
-- 
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.

  70 percent of American adults do not understand the scientific process.
From: Stefan Schmiedl
Subject: Re: How to keep case in UNIX pathnames
Date: 
Message-ID: <acv55t$slg3d$1@ID-57631.news.dfncis.de>
On Mon, 27 May 2002 20:53:52 GMT,
Erik Naggum <····@naggum.net> wrote:
>   Why are you using logical pathnames when you get input pathnames from the
>   user?  What part of "one-way mapping" did you not understand?  *sigh*

Another bit fell into place ... thanks for the nudge.

s.
From: Aleksandr Skobelev
Subject: Re: How to keep case in UNIX pathnames
Date: 
Message-ID: <paktca.4p.ln@hermit.athome>
Thank you. 

So, logical pathnames is a leverage for mapping pathnames for files that
are, in some sense, the part of a program, but it is not a leverage for
mapping to/from any phisical pathname into an internal representation.
Don't I misunderstand you?

Erik Naggum <····@naggum.net> wrote:
> * Aleksandr Skobelev <·········@mail.ru>
> | Or, may be, what is a proper way to use logical-pathnames with mixed-case
> | filenames under UNIX?
> 
>  You need to understand that the point with logical pathnames is to have a
>  file-system--independent file naming convention that makes porting your
>  application to a different system not require any internal changes.  This
>  is a fantastically useful thing.  If Unix had had logical pathnames, Unix
>  administration, setup, package installation, etc, would have been simple
>  and straightforward.  Instead, we have tons of different directories that
>  need to be kept in sync, and packages have compiled-in pathnames.  After
>  I grokked logical pathnames, I have emulated or implemented them wherever
>  I have gone.  Global file systems are simply not good at what they
>  attempt to do, and hardwiring directories into programs is simply wrong.
> 
>  The mapping from logical to physical pathnames is strictly one-way.  The
>  idea is to work within a known and safe universe of names and directories
>  that are always portably mappable to physical pathnames.  As long as you
>  live within that universe, you have solved a number of problems that are
>  hard even to understand are solvable without such a (standard) mechanism.
> 
>  So you construct the logical file system with a small number of logical
>  hosts and name all your files within it/them, and then arrange for the
>  physical world to have the physical files and directories to which they
>  are mapped.  Going the other way around is simply misguided.
From: Erik Naggum
Subject: Re: How to keep case in UNIX pathnames
Date: 
Message-ID: <3231523838220276@naggum.net>
* Aleksandr Skobelev
| So, logical pathnames is a leverage for mapping pathnames for files that
| are, in some sense, the part of a program, but it is not a leverage for
| mapping to/from any phisical pathname into an internal representation.
| Don't I misunderstand you?

  I have no idea how to answer this last question.  Both "yes" and "no"
  appear to mean that you misunderstand me.  Consequently, I do not even
  know whether you have stated something you believe or something you do
  not believe.

  The key is: You do _not_ map physical pathnames to logical.
-- 
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.

  70 percent of American adults do not understand the scientific process.