unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Florian Lindner <Florian.Lindner@xgm.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: version-control and make-backup-file-name-function
Date: Fri, 15 Aug 2008 19:22:55 +0200	[thread overview]
Message-ID: <874p5mi45s.fsf@tux.homenetwork> (raw)
In-Reply-To: <f13b3bf1-6dfb-4384-840b-ca2854cb922f@2g2000hsn.googlegroups.com> (Florian Lindner's message of "Fri, 15 Aug 2008 09:20:58 -0700 (PDT)")

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	other threads:[~2008-08-15 17:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15 16:20 version-control and make-backup-file-name-function Florian Lindner
2008-08-15 17:22 ` Thierry Volpiatto [this message]
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

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=874p5mi45s.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=Florian.Lindner@xgm.de \
    --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).