From: Le Wang <l26wang@gmail.com>
To: orium <orium69@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: When does emacs backup files?
Date: Mon, 21 Feb 2011 13:10:49 +0800 [thread overview]
Message-ID: <AANLkTimfcRxQoJk1iCkHxVRJmd3WokWb_X-R25XyaYZY@mail.gmail.com> (raw)
In-Reply-To: <01812190-7de6-4215-a71e-a2ef1f18637f@l11g2000yqb.googlegroups.com>
[-- Attachment #1: Type: text/plain, Size: 771 bytes --]
On Sat, Feb 19, 2011 at 7:57 AM, orium <orium69@gmail.com> wrote:
> Hi,
>
> I want my emacs to backup every file on save (with version control),
> but for some reason i only have one version of each file.
>
If you read the description of `save-buffer', you'll see that this is by
design. I think this comes from the olden times when disk space was
precious.
How can have one new backup version created every time i save a file?
>
You can force a backup whenever you save, by mapping C-xC-s to something
like this:
(defun le::save-buffer-force-backup (arg)
"save buffer, always with a 2 \\[universal-argument]'s
see `save-buffer'
With ARG, don't force backup.
"
(interactive "P")
(if (and arg (listp arg))
(save-buffer)
(save-buffer 16)))
--
Le
[-- Attachment #2: Type: text/html, Size: 1592 bytes --]
prev parent reply other threads:[~2011-02-21 5:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 23:57 When does emacs backup files? orium
2011-02-20 19:54 ` Peter Dyballa
2011-02-20 20:16 ` Teemu Likonen
2011-02-20 20:44 ` Peter Dyballa
2011-02-23 4:44 ` Kevin Rodgers
2011-02-23 20:55 ` Peter Dyballa
2011-02-21 5:10 ` Le Wang [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimfcRxQoJk1iCkHxVRJmd3WokWb_X-R25XyaYZY@mail.gmail.com \
--to=l26wang@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=orium69@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.