help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: repeating input with different outputs


From: Andreas Röhler
Subject: Re: repeating input with different outputs
Date: Sat, 15 Oct 2011 09:50:16 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.23) Gecko/20110920 SUSE/3.1.15 Thunderbird/3.1.15

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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]