all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Making a backup file on every buffer save?
@ 2011-05-02 14:17 Roy Smith
  2011-05-02 14:32 ` Alain Ketterlin
  0 siblings, 1 reply; 3+ messages in thread
From: Roy Smith @ 2011-05-02 14:17 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Making a backup file on every buffer save?
  2011-05-02 14:17 Making a backup file on every buffer save? Roy Smith
@ 2011-05-02 14:32 ` Alain Ketterlin
  2011-05-02 15:32   ` Roy Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Alain Ketterlin @ 2011-05-02 14:32 UTC (permalink / raw)
  To: help-gnu-emacs

Roy Smith <roy@panix.com> writes:

> 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.

A few paragraphs later, the doc mentions that C-u C-u C-x C-s should do
what you want (but I guess auto-save is supposed to solve the kind of
problem you had). Or you can call make-backup explicitly.

-- Alain.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Making a backup file on every buffer save?
  2011-05-02 14:32 ` Alain Ketterlin
@ 2011-05-02 15:32   ` Roy Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Roy Smith @ 2011-05-02 15:32 UTC (permalink / raw)
  To: help-gnu-emacs

On May 2, 10:32 am, Alain Ketterlin <al...@dpt-info.u-strasbg.fr>
wrote:
> Roy Smith <r...@panix.com> writes:
> > 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.
>
> A few paragraphs later, the doc mentions that C-u C-u C-x C-s should do
> what you want (but I guess auto-save is supposed to solve the kind of
> problem you had). Or you can call make-backup explicitly.
>
> -- Alain.

Oh, duh.  I just didn't read far enough.  Thanks for pointing that
out!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-02 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-02 14:17 Making a backup file on every buffer save? Roy Smith
2011-05-02 14:32 ` Alain Ketterlin
2011-05-02 15:32   ` Roy Smith

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.