[comp.sys.ti.explorer] problem with file extension changes

krovetz@Wayback (07/05/90)

When I write out a file (using C-X C-W), and I try to change some part of
the pathname, the system will also change the file type from TXT to TEXT.
Does anyone know how to prevent this?  This only appears to happen with
TXT files and it causes me to end up with different versions of the same
file (some with TXT and some with TEXT).  I usually do this when the host
on which I read the file has crashed and I wish to write it to a different
host.  The hosts are clustered under VMS, so it doesn't matter which one
I use.

Thanks,
Bob

krovetz@cs.umass.edu

Rice@SUMEX-AIM.STANFORD.EDU (James Rice) (07/06/90)

>>  When I write out a file (using C-X C-W), and I try to
>>  change some part of the pathname, the system will also
>>  change the file type from TXT to TEXT.  Does anyone
>>  know how to prevent this?  This only appears to happen
>>  with TXT files and it causes me to end up with
>>  different versions of the same file (some with TXT and
>>  some with TEXT).  I usually do this when the host on
>>  which I read the file has crashed and I wish to write
>>  it to a different host.  The hosts are clustered under
>>  VMS, so it doesn't matter which one I use.

>>  Thanks, Bob

>>  krovetz@cs.umass.edu

This is caused by the fact that the pathname system is
recognising .TXT as being the canonical representation for
the :TEXT file type under VMS.  Maybe the easiest way to
"fix" this would be to remove the canonical file type for
:text, i.e. change:

fs:
(DEFINE-CANONICAL-TYPE :TEXT "TEXT"
  ((:TOPS20 :TENEX :VMS4) "TEXT" "TXT")
  (:UNIX "TX" "TEXT" "TXT")
  (:UNIX-UCB "TEXT" "TX" "TXT")
  ((:MSDOS :VMS) "TXT"))

into your prefered mapping.



Rice.

snicoud@ATC.BOEING.COM (Stephen L. Nicoud) (07/06/90)

    Date: 4 Jul 90 18:00:03 GMT
    From: m2c!umvlsi!dime!krovetz@husc6.harvard.edu

    When I write out a file (using C-X C-W), and I try to change some part of
    the pathname, the system will also change the file type from TXT to TEXT.
    Does anyone know how to prevent this?  This only appears to happen with
    TXT files and it causes me to end up with different versions of the same
    file (some with TXT and some with TEXT).  I usually do this when the host
    on which I read the file has crashed and I wish to write it to a different
    host.  The hosts are clustered under VMS, so it doesn't matter which one
    I use.

    Thanks,
    Bob

    krovetz@cs.umass.edu

This probably has to do with canonical file types on the Explorer.  I
believe the canonical file type :TEXT translates to the VMS file extension
"TXT".  But on the Explorer it translations to "TEXT".  Look at the
variables: FS:*CANONICAL-TYPES-ALIST* & FS:*DEFAULT-CANONICAL-TYPES* (I'm
guessing at the names of these variables, it's been awhile since I've
messed with 'em).   The I/O Ref Manual might yield some help on how to
adjust these variables to get the behavior you want.

One workaround, that I know this is not very convenient, is when you do c-x
c-w specify the pathname type and that should override the Explorer's
defaulting to the canonical file type.

Steve

israel@CS.UMD.EDU (Bruce Israel) (07/06/90)

   From: James Rice <Rice@sumex-aim.stanford.edu>

   >>  When I write out a file (using C-X C-W), and I try to
   >>  change some part of the pathname, the system will also
   >>  change the file type from TXT to TEXT.  

   >>  krovetz@cs.umass.edu

   This is caused by the fact that the pathname system is
   recognising .TXT as being the canonical representation for
   the :TEXT file type under VMS.  

Except that I've had the same problem that Bob had on my MicroExplorer,
with no VMS machines anywhere in sight (or any other remote machines).

It seems to me that it should *never* change any part of a filename that I
don't change myself (irrespective of any mappings or settings).

Bruce