Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!eecae!netnews.upenn.edu!rutgers!mcnc!rti!talos!kjones From: kjones@talos.UUCP (Kyle Jones) Newsgroups: comp.emacs Subject: Re: do-auto-save bug/feature Message-ID: <443@talos.UUCP> Date: 22 Feb 89 14:41:06 GMT References: <50852@yale-celray.yale.UUCP> <357@skipnyc.UUCP> Reply-To: kjones@talos.UUCP (Kyle Jones) Organization: Philip Morris Research Center, Richmond, VA Lines: 38 In article <357@skipnyc.UUCP> skip@skipnyc.UUCP (Skip Gilbrech) writes: >+ /* sg - it's a stupid assumption that the contents of a >+ * shrunken file aren't worth saving... Well, that's not quite the assumption that's being made. The idea behind the 10/13th's Rule is that if a buffer is significantly smaller since the last auto-save, then it is better not to overwrite the auto-save file, since the auto-save file contains potentially valuable data. Very valueable indeed if you'd accidentally hit C-w sometime within the last 300 keystrokes and killed more text than undo can recover. The "Buffer %s has shrunk ..." message lets you know that your buffer has lost a lot weight and gives you a chance to recover, before it's too late. Folks who read gnu.emacs probably remember me arguing against this feature. I did so because I have never deleted a big chunk of my buffer without realizing it. But I can see how it COULD happen if, say, I were touch typing in a document and not looking at the screen. A novice could make a mistake like this even while looking at the screen. (Thanks, RMS, for prodding me to think a bit more.) However, there are still problems. 1) The rule works OK for large buffers but is too sensitive to changes in buffers smaller than 3K. Replying to news or mail with included text is a good example of this. 2) The rule can cause Emacs to refuse to auto-save a buffer that hasn't been auto-saved at all. For example, the article I'm typing hasn't been auto-saved at all because I used 'F' from rn and then killed most of the included text before Emacs auto-saved. Even if Emacs get sent a fatal signal, if the 10/13th's Rule says don't auto-save, it won't. 3) There ought to be a variable to turn this feature off. I suspect we'll see this in v19. Surely having the auto-save code recognize a buffer named "*mail*" is a transient thing. kyle jones ...!uunet!talos!kjones "You take romance, I'll take Jello."