* version-control and make-backup-file-name-function
@ 2008-08-15 16:20 Florian Lindner
2008-08-15 17:22 ` Thierry Volpiatto
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Florian Lindner @ 2008-08-15 16:20 UTC (permalink / raw)
To: help-gnu-emacs
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#
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: version-control and make-backup-file-name-function
2008-08-15 16:20 version-control and make-backup-file-name-function Florian Lindner
@ 2008-08-15 17:22 ` Thierry Volpiatto
2008-08-19 7:41 ` Kevin Rodgers
[not found] ` <mailman.17017.1219131677.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Thierry Volpiatto @ 2008-08-15 17:22 UTC (permalink / raw)
To: Florian Lindner; +Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: version-control and make-backup-file-name-function
2008-08-15 16:20 version-control and make-backup-file-name-function Florian Lindner
2008-08-15 17:22 ` Thierry Volpiatto
@ 2008-08-19 7:41 ` Kevin Rodgers
[not found] ` <mailman.17017.1219131677.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2008-08-19 7:41 UTC (permalink / raw)
To: help-gnu-emacs
Florian Lindner wrote:
> 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?
Try setting backup-directory-alist instead of
make-backup-file-name-function.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: version-control and make-backup-file-name-function
[not found] ` <mailman.17017.1219131677.18990.help-gnu-emacs@gnu.org>
@ 2008-08-21 19:16 ` Florian Lindner
0 siblings, 0 replies; 4+ messages in thread
From: Florian Lindner @ 2008-08-21 19:16 UTC (permalink / raw)
To: help-gnu-emacs
On 19 Aug., 09:41, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
> FlorianLindnerwrote:
> > 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?
>
> Try setting backup-directory-alist instead of
> make-backup-file-name-function.
That puts all my backup files into one dir with the filename changed
to "dir1!dir2!file". Or can this be changed?
Thanks
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-21 19:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-15 16:20 version-control and make-backup-file-name-function Florian Lindner
2008-08-15 17:22 ` Thierry Volpiatto
2008-08-19 7:41 ` Kevin Rodgers
[not found] ` <mailman.17017.1219131677.18990.help-gnu-emacs@gnu.org>
2008-08-21 19:16 ` Florian Lindner
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.