Message from discussion
write-file like function help needed
Path: g2news2.google.com!postnews.google.com!n67g2000cwd.googlegroups.com!not-for-mail
From: "keithv" <kvet...@gmail.com>
Newsgroups: gnu.emacs.help
Subject: write-file like function help needed
Date: 13 Dec 2006 12:37:17 -0800
Organization: http://groups.google.com
Lines: 21
Message-ID: <1166042237.856019.98270@n67g2000cwd.googlegroups.com>
NNTP-Posting-Host: 67.104.154.42
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1166042244 28132 127.0.0.1 (13 Dec 2006 20:37:24 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 13 Dec 2006 20:37:24 +0000 (UTC)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 ISAUS
Complaints-To: groups-abuse@google.com
Injection-Info: n67g2000cwd.googlegroups.com; posting-host=67.104.154.42;
posting-account=Z2JKMw0AAACH92Sefj7zEY6iMKpV_sXm
Hi,
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?
Thanks in advance,
Keith