🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98881

documentation for `replace-regexp'

#98881
From: Eric Hanchrow
Date: Fri, 25 Jan 1991 22:15
31 lines
2059 bytes
If you ask `replace-regexp' to delete all occurances of `foo' that
appear at the beginning of a line, like this
	M-x replace-regexp RET ^foo RET RET
and if the buffer it's working on looks like this
	---------- Buffer: *scratch* ----------
	you
	foo
	foofoo
	do
	---------- Buffer: *scratch* ----------

then it will delete *both* occurances of `foo' on the third line,
since after it has deleted the first `foo' on that line, it now sees a
that the line contains nothing but the remaining `foo'.  This also
matches the regular expression, so it deletes it too.

Whether or not this behavior is desirable is debateable, but it is
pretty unexpected, at least to those of us with no experience with
Emacs.  The manual should point out that this happens, so that it
doesn't come as a surprise.  You might put the contents of this
letter, up to but not including this paragraph, into the manual to
explain.

Thanks.

       ------------------------------------------------------------------------
       |Eric Hanchrow		sun.com!nosun!yamada-sun!eric		      |
       |Phase III Logic, Inc.	cse.ogi.edu!yamada-sun!eric		      |
       |1600 N.W. 167th Place		Beaverton, OR 97006-4800 USA	      |
       |Voice: (503)-645-0313		Fax: (503)-645-0207     as of 4-Oct-89|
       --------------Crackling-noises-OK--do-not-correct!----------------------
Technical Details
Message-ID: <9101252215.AA10909@>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!snorkelwacker.mit.edu!think.com!sdd.hp.com!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!AI.MIT.EDU!yamada-sun!eric

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,9f148e16d4e7bc9b,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-01-25 14:15:23 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!snorkelwacker.mit.edu!think.com!sdd.hp.com!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!AI.MIT.EDU!yamada-sun!eric
From: yamada-sun!eric@AI.MIT.EDU (Eric Hanchrow)
Newsgroups: gnu.emacs.bug
Subject: documentation for  `replace-regexp'
Message-ID: <9101252215.AA10909@>
Date: 25 Jan 91 22:15:23 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 31
Approved: bug-gnu-emacs@prep.ai.mit.edu