Losing my work in vi!
David Elliott
dce at quacky.UUCP
Sun Dec 21 03:48:19 AEST 1986
In article <305 at vsedev.VSE.COM> ron at vsedev.UUCP (Ron Flax) writes:
>In article <21107 at styx.UUCP> carlson at styx.UUCP (John Carlson) writes:
>
>...
> Guess what happens? That's right, all of my changes are lost! How
> about setting the 'modified' flag whenever a restore is done?
>
>Which version of vi are you running? Mine which is 3.9, of 2/9/83 does
>as you suggest.
>
There are two problems here:
1. The name of this newsgroup is comp.bugs.4bsd. 4.3BSD comes
with ex version 3.7. If Ron is running a BSD system, how can
he have 3.9, which is the version that comes with System V.3?
Anyway, 4.3BSD is broken in this regard (unless someone walked
on the sources again).
2. As pointed out recently in this newsgroup, the proper solution
is to set the modified and not edited (really unsetting the
edited) flags.
If you just set the modified flag, this can happen:
vi file
...
system crash or phone line lost
log in again
continue editing
save changes
read mail and find out you need to recover, or just run vi -r
vi -r file
ZZ
OOPS! You just undid your changes.
By setting the 'not edited' state, you have to do a w!, which requires
a little extra thought.
At Tektronix, the people in Tony Birnseth's group changed vi to have a
'recovered' state. I don't know if this implied the above, but it was
nice to do a :f or ^G and see '[Recovered]'.
David Elliott
Mips Computer Systems
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list