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

Re: Dangerous bug in "Replace string" !



"Replace string" deletes too many characters under certain conditions, over and
above those specified for replacement.  This can be observed in Query-Replace but
is especially dangerous in Replace-All-Occurences-Of.

In summary, if in Text Mode I have

One
Hi
Two
Hi
Three
Hi
Four
Hi
Five



at the end of my file, and command to
Replace All Occurences Of "HI<RET>" to "X"
(I inserted the <RET> with Control-q ; was this my bug?)
I wind up with:

OXTXThrXFoXFive

if memory serves.  Get the idea?
Is there a better way to search for carriage returns, (i.e. without using
Control-q)?  Did you know about this bug?

Since it munges the ENDS of lines,  it can be insidious, as it was when I
was converting a file from TJ6 to R format.