help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: version-control and make-backup-file-name-function


From: Thierry Volpiatto
Subject: Re: version-control and make-backup-file-name-function
Date: Fri, 15 Aug 2008 19:22:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Florian Lindner <Florian.Lindner@xgm.de> writes:

> Hello,
>
> I'm bringing this up again, since my question in the old thread [1]
> produced no more answers...
>
> I have a customized backup function:
>
> (defun my-backup-file-name (fpath)
>   (let (backup-root bpath)
>     (setq backup-root "~/.emacs.d/backup")
>     (setq bpath (concat backup-root fpath "~"))
>     (make-directory (file-name-directory bpath) bpath)
>     bpath
>     )
>   )
>
> combinded with the backup settings:
>
> (setq make-backup-file-name-function 'my-backup-file-name
>       version-control t
>       delete-old-versions t
>       kept-new-versions 6
>       kept-old-versions 2)
>
>
> When uncommenting make-backup-file-name-function it works with backups
> in the same dir as the original. With make-backup-file-name-function
> there are backups in the .emacs/backup dir but only the first version
> which is never updated. I suspect it's a problem with the creation of
> the backup file name for the n-th version.
>
> Anyone got an idea how to combine versioned backups and custom
> location?
> Furthermore: What is the difference between kept-new-versions and kept-
> old-versions? I did RTM but I'm still not sure.
>
> Thanks,
>
> Florian
>
> [1] 
> http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/2f29712021157725#
>
When you modify a file, `kept-new-versions 6' will keep 6 versions of the
file to the differents states of development and then delete all these
versions but not the last two ==> `kept-old-versions 2'.And then go up
again to 6 ...etc... Correct me if i am wrong.
-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France




reply via email to

[Prev in Thread] Current Thread [Next in Thread]