From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: emacs insert icrement numbers Date: Fri, 18 Aug 2006 08:38:31 +0200 Organization: Organization?!? Message-ID: <85k656wntk.fsf@lola.goethe.zz> References: <8764grmpkt.fsf@thalassa.informatimago.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1155883244 8447 80.91.229.2 (18 Aug 2006 06:40:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Aug 2006 06:40:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 18 08:40:37 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GDy1z-0001Zo-1c for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Aug 2006 08:40:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDy1y-0002in-7s for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Aug 2006 02:40:34 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:b2iieiOmWbr9Rg0RdX2UvcgDyCQ= Original-Lines: 27 Original-NNTP-Posting-Date: 18 Aug 2006 08:38:43 CEST Original-NNTP-Posting-Host: b96be217.newsspool3.arcor-online.net Original-X-Trace: DXC=4W\AhVi2`>f]BlmkiiU@BiMcF=Q^Z^V3h4Fo<]lROoRa4nDHegD_]Re=m`0S04Re:g1_LiI6ENVam3>5MOK`\=3aKU1_0^I@LLi Original-X-Complaints-To: usenet-abuse@arcor.de Original-Xref: shelby.stanford.edu gnu.emacs.help:141125 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36750 Archived-At: Jim Ottaway writes: > Regards, > > Pascal Bourguignon writes: > >> With latest versions (>=22), you can use \,form in the the substitutions. >> >> For example, select a region and: >> >> M-x replace-regexp RET \(.*\) RET >> \,(progn(defvar n 0)(format "%3d " (incf n)))\1 RET >> > > Or > > M-x replace-regexp RET ^ RET \,\# > > [there are two spaces after the '\#'. I don't know why it needs 2 rather > than one, though] To distinguish this from \,\#1 for example. The space terminates \#. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum