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: Tim Landscheidt
Subject: Re: repeating input with different outputs
Date: Sat, 15 Oct 2011 03:14:26 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

ishi soichi <soichi777@gmail.com> wrote:

> 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?

Of course :-). For example, try M-: (dotimes (i 46) (insert
(format "chapter 4.%d\n" (+ i 1)))) RET.

Tim




reply via email to

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