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

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

backup files and version control


From: Heiko Gerdau
Subject: backup files and version control
Date: Thu, 17 Feb 2005 11:14:24 +0100
User-agent: KMail/1.7.1

Hi,

I need some advice concerning backup files and version control.

I have written my own elisp function "make-backup-file-name" to collect backup 
files in subdirectories named ".backup~". (function is attached at the end of 
this mail)

It works fine for all regular files except if they are under version control. 
Than the backup files are scattering with the version numbers  attached in 
the same directory as the original file which is realy unconfortable if I 
want to use tools like grep etc.

I also tried (setq version-control (quote never)) with no effect.

So my question:
What can I do to put also those files into my backup subdirectory that are 
under version control?

Any help is appriciated
Thanks
Heiko

Here is my version of "make-backup-file-name"
;; Create backup files in a separate subdirectory
(defun make-backup-file-name (file)
  (let ((dir (concat (file-name-directory file) ".backup~")))
    (if (not (file-exists-p dir))
        (make-directory dir))
    (concat dir "/" (file-name-nondirectory file) "~")))





reply via email to

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