[LispM] NFS file version: naming conventions

Christopher Stacy cstacy at csail.mit.edu
Fri Aug 4 08:12:29 PDT 2017



On 08/04/2017 09:54 AM, Alfred M. Szmidt wrote:
> Not sure why you wish to deviate from the convention, Emacs has been
> using FILE.~N~ as a convention for backup / versioned files for
> decades.  This means that on a .sct exported directory you can have
> foo.lisp and foo.lisp.~N~ where things are handled sensible.
> ______________________________________

You *could* have unversioned "foo.lisp" but I don't remember if it 
handled in the
correct way that you're thinking (e.g. it being :version :newest, and 
opening it
for writing generating a new numbered version and renaming the old one, 
etc.)
The system certainly did that correctly on ITS and LMFS (and TOPS-20 and 
VMS),
but all of those filesystems natively supported versions in the first place.
As you know, the Unix support for this is a complete hack that neither 
the Unix
filesystem nor any Unix programs or shells understand.

There is no standard versioning convention on Unix, and at the time I 
remember
Unix people thinking we were weird for wanting versioned files at all.
(I don't believe they had RCS in mind, either.)
Nowadays, the most official place that a Unix versioning scheme appears 
would
be in links to dynamic library modules, and it's "libXpm.so.4.11.0".

Only Emacs uses the ".~213~" convention, and it is not for normal 
versioned files.
It is for BACKUP files.  Those are files that will be elided in 
directory listings ("ls -B")
and are considered something to be (perhaps automatically) deleted.

In fact, there are no unversioned files in the Symbolics source tree.
There are only versioned files.
These are not "backup" files; they are a primitive kind of version 
control system.

So, if you are using GNU programs that are aware of the Symbolics 
convention,
it may appear (e.g. in Dired) that there are no files there at all!
And you have to be very careful not to accidently delete any of those 
"backup" files you do see.
I think this is not a coincidence.

If I were implementing file versions for Unix today...well, I'd do it on 
the Unix end
with a version-aware filesystem that's slightly more sophisticated than 
the ones
we had on ITS et al.  Then the LispM could have a file access-path that 
spoke natively.

If you're just using (pehaps a portion) of Unix for LispM file storage, 
and never
accessing those files from Unix, there is no need to change the old 
weird tilde convention.

If you're stuck with a non-versioning Unix filesystem and the desire to 
use GNU programs
on those files, then changing the convention to a non-backup 
"foo.lisp.123" seems quite
reasonable to me.  If you can have the dir caching heuristics I 
suggested, even better.

Chris "Six letter filenames were never...oh nevermind" Stacy







More information about the LispM mailing list