[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Write File trouble
- To: Bug-EMACS@MIT-MC
- Subject: Write File trouble
- From: David Eppstein <Kronj@Sierra>
- Date: 6 Sep 1983 10:06 PDT (Tue)
Date: Tuesday, 6 September 1983 03:20-PDT
From: RMS at MIT-OZ
Does anyone remember what the trouble was
that was fixed by making EMACS write a temporary file and rename it
on Twenex? I know that it was changed because it lost in some
circumstances, but I forgot years ago what they were.
If you write to a specific version of the file, rather than the normal
version -1 (next available version), then if you open the file for
write the old contents are immediately blown away so if the system
crashes you have lost big. EMACS makes such an effort to write
version -1 though that I think writing the temporary file and renaming
is more trouble than it is worth. It also makes it impossible to
write to LPT: ...
However, Babyl uses Write File to save its files, and it *does* write
to specific versions normally. Perhaps it should write the file
itself, but I think a better solution is for Write File to be smarter
about how it writes files. If it is writing to version -1 or to a
non-disk file (test this with the DVCHR% jsys; can TECO do this?) it
should do the simple write, but if it is writing to a specific version
or version 0 of a disk file it should go with the rename.