unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: keyboard macro question
Date: Fri, 02 Oct 2009 16:34:28 +0200	[thread overview]
Message-ID: <877hvduaob.fsf@lola.goethe.zz> (raw)
In-Reply-To: 578073a3-391f-481d-9d05-303bfef8e01c@x37g2000yqj.googlegroups.com

Benjamin <jbenjam@gmail.com> writes:

> 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
>
> I don't mind doing something other than macros, or even external
> commands (perl/sed/awk, etc.)
> to assist with this.

C-M-% tmp SPC RET tmp\,(1+ \#) C-q C-j RET

-- 
David Kastrup


  parent reply	other threads:[~2009-10-02 14:34 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 [this message]
2009-10-02 14:54   ` jbenjam
2009-10-02 14:50 ` Colin S. Miller
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=877hvduaob.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --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).