From xemacs-m  Sun Apr 20 13:32:00 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id NAA04131
	for <xemacs-beta@xemacs.org>; Sun, 20 Apr 1997 13:31:58 -0500 (CDT)
Received: by crystal.WonderWorks.COM 
	id QQcmcw22597; Sun, 20 Apr 1997 14:31:50 -0400 (EDT)
Date: Sun, 20 Apr 1997 14:31:50 -0400 (EDT)
Message-Id: <QQcmcw22597.199704201831@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: xemacs-beta@xemacs.org, ben@666.com, jwz@netscape.com
Subject: Re: autosave [Jamie Zawinski <jwz@netscape.com>]
In-Reply-To: <199704201315.AA282022134@martigny.ai.mit.edu>
References: <m2ohba2i19.fsf@altair.xemacs.org>
	<199704201315.AA282022134@martigny.ai.mit.edu>
X-Mailer: VM 6.28 under 19.15 XEmacs Lucid
X-Face: /cA45WHG7jWq>(O3&Z57Y<"WsX5ddc,4c#w0F*zrV#=M
        0@~@,s;b,aMtR5Sqs"+nU.z^CSFQ9t`z2>W,S,]:[+2^
        Nbf6v4g>!&,7R4Ot4Wg{&tm=WX7P["9%a)_da48-^tGy
        ,qz]Z,Zz\{E.,]'EO+F)@$KtF&V

Bill Dubuque writes:
 > Steven L Baur <steve@miranova.com> wrote to xemacs-beta on 20 Apr 1997:
 > | 
 > | The motion is put forward to enable autosaving in recovered buffers.
 > | I'm inclined to agree with him, but as always I am open to discussion.
 > 
 > I think this is probably the correct thing to do since, conceptually,
 > you should be in the same state after a recover-file as you were before
 > the Emacs crash (so auto-save should still be on).
 > 
 > However, unless this was a fluke, someone explicitly decided NOT to 
 > re-enable auto-save after a recover-file so it would be worthwhile
 > to try to figure out why they made this decision. Is there some
 > screw case we are overlooking?

If we're talking about enabling auto-save-mode immediately after
recover-file, I can think of some problem cases.

1. The local filesystem is full.  You do M-x recover-file and now
   you have your recovered buffer.  Emacs tries to autosave,
   manages to truncate the autosave file but not write anything.
   The filesystem is sitll full.  You now have no autosave file and
   (maybe) no safe place to save the file.  Now what?

2. In MULE, if the file is recovered using a coding system that
   can't handle all the chars, saving or autosaving it would lose
   information.

So, I don't think autosave should be turned back on until the
recovered file has been successfully rewritten to the disk.  This
is what Jamie suggested I think, turn it on after the file is
saved, not after it is recovered.

 > Another problem, even more serious in my mind, is that you can lose
 > your precious autosave file if you accidentally spazz and edit the
 > buffer before you have a chance to recover. E.g. if after C-x C-f
 > you spazz and insert a char then the autosave is lost (maybe this
 > has been fixed since last time I looked?).

You won't lose the autosave file immediately unless you're unlucky
enough that the autosave timer expires immediately thereafter.  VM
avoids this lossage by visiting a folder read-only when it detects
that the autosave file is newer.  You also get the "Red Cross"
Recover button in the toolbar as a visual indication.

I think Emacs should adopt both of these practices, i.e. visit a
potentially recoverable file read-only and add some visual
indicator to remind the user that there is a crash file.

I agree with Bill about the user having to make an explicit
decision to discard the autosave file changes.  The decisive
action should be to take the file out of read-only mode and start
editing it.

