Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!charon!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.editors Subject: Re: :wq (Re: One user's editor wish list) Message-ID: <3234@charon.cwi.nl> Date: 31 Mar 91 02:06:32 GMT References: <2900@wn1.sci.kun.nl> <1991Mar29.160622.5445@informix.com> <11638@dog.ee.lbl.gov> Sender: news@cwi.nl Organization: CWI, Amsterdam Lines: 25 In article <11638@dog.ee.lbl.gov> torek@elf.ee.lbl.gov (Chris Torek) writes: > In article <1991Mar29.160622.5445@informix.com> dberg@informix.com > (David I. Berg) writes: > >... Once upon a time a system crashed during a long and arduous edit > >session. When the system came back up, I successfully recovered my > >file with vi -r, but had other things to do just then, so I > >autumatically entered ZZ and went on with my business. > > This is a bad idea, and not only because in some version of vi it does > not write the file anywhere. You should *always* write recovered files > to a new (temporary) name and compare the original and new files > manually, as it is possible for recovered files to be partially > mangled. In that case I would say the design is wrong. Things that users naturally do (entering ZZ, and I have done it also a few times), do not what is expected. I think it would be better to have a single recover file command that would replace 'vi -r', 'ex -r', and friends. As for the partially mangled bit: if this does occur that is also bad design. There is no reason at all that an aborted edit session would leave a mangled internal file. (Yes, I did an editor on a Cyber. The system was able to crash frequently. All I would ever loose were the results of the last few commands entered.) -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl