unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Possible bug in replace-regexp?
@ 2007-11-20 23:59 Moira
  2007-11-21  9:47 ` Peter Dyballa
  0 siblings, 1 reply; 4+ messages in thread
From: Moira @ 2007-11-20 23:59 UTC (permalink / raw)
  To: help-gnu-emacs

Hi.

I've just attempted some regular expression search/replace in emacs -  
a thing I like to do in editors - and noticed some strange behaviour.  
I thought I'd rather ask here before posting a bug-report to early.

If my search contains a grouped quantor like this "myString\(.*?\)" a  
C-q,C-j newline in the replacement is added *before* the groups  
backreference, even if it's placed behind it.
Like in this replace: "myString\1[emacs C-q,C-j comes here]".

This should yield:
 >>>
...
some-stuff
myString more-stuff-in-the-myString-line
the-rest
...
<<<

Instead it causes this:
 >>>
...
some-stuff
myString
more-stuff-in-the-myString-line the-rest
...
<<<

I should add that this is Aquaemacs, a native GUI Emacs port for OS  
X. I haven't tried it the CLI version yet and I'm not 100% sure C-q,C- 
j is the way of putting a newline into the replacement.

Is this a bug (read: can you guys reproduce it?) and/or are there  
other ways to approach this problem?

Thanks for any advice and input on the subject.

Phillip

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-22 23:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.3861.1195603200.18990.help-gnu-emacs@gnu.org>
2007-11-22 22:45 ` Possible bug in replace-regexp? David Reitter
2007-11-22 23:42 ` Johan Bockgård
2007-11-20 23:59 Moira
2007-11-21  9:47 ` Peter Dyballa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).