From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: help-gnu-emacs@gnu.org
Subject: Re: repeating input with different outputs
Date: Sat, 15 Oct 2011 09:50:16 +0200 [thread overview]
Message-ID: <4E993B38.3000106@easy-emacs.de> (raw)
In-Reply-To: <CAEjRLuQ3EdB88vqY+bAZcSTcg_NOk33jgkVk=nT6sLDCENZUyQ@mail.gmail.com>
Am 14.10.2011 13:20, schrieb ishi soichi:
> I have a question about typing (or programming, or maybe a macro).
>
> Say, I'm writing a text (which can be in any mode, html-mode, cpp-mode, or
> whatever)
>
> I would like to input like
>
> chapter 4.1
> chapter 4.2
> chapter 4.3
> ...
>
> chapter 4.46
>
> So, it is very tedious. I would rather set up a program or a command that
> can do this job instantaneously.
>
> Could Emacs do this?
>
> soichi
>
you may use query-replace-regexp
chapter 4.\([0-9]+\)
RET
chapter 4.\,(1+ (string-to-number \1))
RET
cheers,
Andreas
--
https://launchpad.net/python-mode
https://launchpad.net/s-x-emacs-werkstatt/
prev parent reply other threads:[~2011-10-15 7:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 11:20 repeating input with different outputs ishi soichi
2011-10-14 11:29 ` Jambunathan K
2011-10-14 12:13 ` Rustom Mody
2011-10-14 17:43 ` Ken Goldman
2011-10-15 3:07 ` ishi soichi
2011-10-15 3:14 ` Tim Landscheidt
2011-10-15 4:46 ` Eric Abrahamsen
2011-10-15 8:17 ` XeCycle
2011-10-16 3:27 ` Tim Landscheidt
2011-10-15 7:50 ` Andreas Röhler [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E993B38.3000106@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.