unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: write-file like function help needed
Date: Thu, 14 Dec 2006 11:12:52 -0700	[thread overview]
Message-ID: <els48j$a3r$2@sea.gmane.org> (raw)
In-Reply-To: <1166042237.856019.98270@n67g2000cwd.googlegroups.com>

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

      parent reply	other threads:[~2006-12-14 18:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-13 20:37 write-file like function help needed keithv
2006-12-13 21:16 ` 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 [this message]

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='els48j$a3r$2@sea.gmane.org' \
    --to=ihs_4664@yahoo.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).