unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: keyboard macro question
Date: Fri, 02 Oct 2009 15:50:23 +0100	[thread overview]
Message-ID: <4ac61330$0$288$14726298@news.sunsite.dk> (raw)
In-Reply-To: <578073a3-391f-481d-9d05-303bfef8e01c@x37g2000yqj.googlegroups.com>

Benjamin wrote:
> I use keyboard macros fairly frequently, but I often run into a
> situation where I would like to increment a number in the macro, e.g.,
> if I start with:
> 
> tmp tmp tmp tmp
> 
> and I want to end with:
> tmp1
> tmp2
> tmp3
> tmp4
> 

Benjamin,
These functions are useful for this situation
C-u 1 C-x r n a   (number-to-register a)
C-x r i a         (insert-register a)
C-x r + a         (increment-register a)

HTH,
Colin S. Miller




  parent reply	other threads:[~2009-10-02 14:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02 14:05 keyboard macro question Benjamin
2009-10-02 14:15 ` Joost Kremers
2009-10-02 14:34 ` David Kastrup
2009-10-02 14:54   ` jbenjam
2009-10-02 14:50 ` Colin S. Miller [this message]
2009-10-02 18:12   ` Harry Putnam
2009-10-02 20:15     ` Tassilo Horn
2009-10-03  2:04 ` Eric
     [not found] ` <d9407676-bb83-46a4-9804-0450cc190b59@v37g2000prg.googlegroups.com>
2009-10-18  1:46   ` David Combs
2009-10-18 17:40     ` Xah Lee
2009-11-12  3:12       ` David Combs
2009-11-13 18:36         ` Lars Enderin

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='4ac61330$0$288$14726298@news.sunsite.dk' \
    --to=no-spam-thank-you@csmiller.demon.co.uk \
    --cc=help-gnu-emacs@gnu.org \
    /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).