Crash-only software: More than meets the eye
Posted Jul 13, 2006 11:15 UTC (Thu) by
nix (subscriber, #2304)
Parent article:
Crash-only software: More than meets the eye
The Emacs autosave feature makes clear another aspect of crash-only software design applicable to systems with persistent state: that sometimes you want to have an explicit 'save' option *as well*, such that the persistent state that is saved at shutdown is only used to restore the state on startup. This is especially true if there's a lot of state.
Many text editors, including a number of vi implementations (not vim) implemented their preserve feature by saving the file periodically, not to /var/tmp or a .swp file, but to the original location. This turned out to be annoying if you decided your changes were a bad idea: :q left the file half-way altered. vim doesn't have this problem, and of course Emacs never did (it would be rather obvious if M-x revert-buffer stopped working, and while in fact it was broken at one point in the XEmacs 21.4 releease cycle, this was a bug, not intentional!)
This particular approach to state saving was *very* common in the DOS/Windows world for a time, and was exceptionally annoying: if anything, it was more annoying than a system with no automatic state saving would have been. It felt like making any change was horribly irrevocable, not least because these systems either had short undo queues or didn't save them on crashing.
(
Log in to post comments)