[comp.emacs] Backup files

Ram-Ashwin@cs.yale.edu (Ashwin Ram) (01/21/89)

This talk of backup files reminds me of a couple of questions/problems I've
had with backup files in GNU Emacs.

1. A backup file saves the file as it existed when it was first visited (read
into a buffer), not when it was last saved.  So if you've been editing a file
for a while and making changes, the backup file does not contain the file as
it was before the last set of changes you saved.  (This is documented in
'info'.)

I can see reasons for both types of behavior.  Perhaps Emacs should make two
backup files, one at first visit and one at last save, or allow the user to
choose which one s/he wants (or even both perhaps).  Is there any way to do
this?  Is there anyway to get the "backup at last save" behavior?

2. If a backup file is deleted or moved, a new backup isn't created.  This
can result in an inadvertent loss of a backup.  For example, if you've been
editing a file for a while, and you've "cleaned" out your directory since,
you may be left with no backup since a new backup will not be created.  This
is related to my earlier comment since "backup at last save" would not have
this problem.  It would be useful if Emacs would at least create a new backup
when a file is saved if the old backup file isn't there already.

Comments?  I suppose I can set up my write-file-hooks to do this, but I would
think this would be nice to have by default.

-- Ashwin.