|
From: | Kevin Rodgers |
Subject: | Re: write-file like function help needed |
Date: | Thu, 14 Dec 2006 11:12:52 -0700 |
User-agent: | Thunderbird 1.5.0.8 (Windows/20061025) |
keithv wrote:
I need help writing a function that works like write-file but first modifies the file name by locating and incrementing any numbers in the file name. For example, if the buffer name is "test1.txt", repeatedly invoking this function would save files with the names "test2.txt", "test3.txt", "test4.txt", etc. The goal being to keep all versions of a given file. My elisp is rusty--I know how I would do the number locate and increment on the buffer text but not for an arbitrary string. Or better yet, is there a package out there to do something similar?
,----[ C-h v version-control RET ] | version-control is a variable defined in `files.el'. | Its value is nil | | Documentation: | *Control use of version numbers for backup files. | t means make numeric backup versions unconditionally. | nil means make them for files that have some already. | `never' means do not make them. | | You can customize this variable. | | [back] `---- -- Kevin
[Prev in Thread] | Current Thread | [Next in Thread] |