From: Moira <moira@demetria.de>
To: help-gnu-emacs@gnu.org
Subject: Possible bug in replace-regexp?
Date: Wed, 21 Nov 2007 00:59:52 +0100 [thread overview]
Message-ID: <C11E6FF9-D6BA-426D-9E3F-5067B7B19906@demetria.de> (raw)
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
next reply other threads:[~2007-11-20 23:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 23:59 Moira [this message]
2007-11-21 9:47 ` Possible bug in replace-regexp? Peter Dyballa
[not found] <mailman.3861.1195603200.18990.help-gnu-emacs@gnu.org>
2007-11-22 22:45 ` David Reitter
2007-11-22 23:42 ` Johan Bockgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C11E6FF9-D6BA-426D-9E3F-5067B7B19906@demetria.de \
--to=moira@demetria.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).