From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Landscheidt Newsgroups: gmane.emacs.help Subject: Re: repeating input with different outputs Date: Sat, 15 Oct 2011 03:14:26 +0000 Organization: Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1318648492 8309 80.91.229.12 (15 Oct 2011 03:14:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 15 Oct 2011 03:14:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 15 05:14:47 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1REuhy-0005xN-Mx for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Oct 2011 05:14:46 +0200 Original-Received: from localhost ([::1]:37927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REuhx-0002b1-Tc for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Oct 2011 23:14:45 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REuht-0002ap-F1 for help-gnu-emacs@gnu.org; Fri, 14 Oct 2011 23:14:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1REuhs-0006ia-6d for help-gnu-emacs@gnu.org; Fri, 14 Oct 2011 23:14:41 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:37807) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REuhs-0006iS-0E for help-gnu-emacs@gnu.org; Fri, 14 Oct 2011 23:14:40 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1REuhq-0005vB-E2 for help-gnu-emacs@gnu.org; Sat, 15 Oct 2011 05:14:38 +0200 Original-Received: from f054054040.adsl.alicedsl.de ([78.54.54.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Oct 2011 05:14:38 +0200 Original-Received: from tim by f054054040.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Oct 2011 05:14:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 25 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: f054054040.adsl.alicedsl.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:fHqY/O8PVzd1eKOx1JP7TJuHUGc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82561 Archived-At: ishi soichi 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