unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Roy Smith <roy@panix.com>
To: help-gnu-emacs@gnu.org
Subject: Making a backup file on every buffer save?
Date: Mon, 2 May 2011 07:17:10 -0700 (PDT)	[thread overview]
Message-ID: <5ce8f81e-e392-4675-8cd9-9dbb5afadf78@x3g2000yqj.googlegroups.com> (raw)

The docs say:

"Emacs makes a backup for a file only the first time the file is
saved from a buffer.  No matter how many times you subsequently save
the file, its backup remains unchanged.  However, if you kill the
buffer and then visit the file again, a new backup file will be made."

Is there any way to override this and get a backup file on every
buffer save?  I'm using GNU Emacs 23.1.1.

I recently managed to blow away a file on disk that I had been editing
and no longer had a copy in an emacs buffer.  I had the backup from
the last time I had visited the file, but had done a lot of work since
then and had saved many intermediate versions.  If those intermediate
saves had generated backups, I would have avoided losing a bunch of
work.  The disk and CPU costs for this are trivial on modern hardware.


             reply	other threads:[~2011-05-02 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-02 14:17 Roy Smith [this message]
2011-05-02 14:32 ` Making a backup file on every buffer save? Alain Ketterlin
2011-05-02 15:32   ` Roy Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ce8f81e-e392-4675-8cd9-9dbb5afadf78@x3g2000yqj.googlegroups.com \
    --to=roy@panix.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).