unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "keithv" <kvetter@gmail.com>
Subject: write-file like function help needed
Date: 13 Dec 2006 12:37:17 -0800	[thread overview]
Message-ID: <1166042237.856019.98270@n67g2000cwd.googlegroups.com> (raw)

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

             reply	other threads:[~2006-12-13 20:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-13 20:37 keithv [this message]
2006-12-13 21:16 ` write-file like function help needed Leo
2006-12-13 22:24 ` Juanma Barranquero
     [not found] ` <mailman.1845.1166044623.2155.help-gnu-emacs@gnu.org>
2006-12-14  2:35   ` Dan Sommers
2006-12-14 18:12 ` Kevin Rodgers

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=1166042237.856019.98270@n67g2000cwd.googlegroups.com \
    --to=kvetter@gmail.com \
    /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).