Newsgroups: bit.listserv.gnuemacs,comp.emacs,de.comp.gnu,fj.editor.emacs,gnu.emacs.help,zer.t-netz.gnu
Path: galaxy.trc.rwcp.or.jp!jaist-news!cs.titech!wnoc-tyo-news!tiger!newsserver.jvnc.net!howland.reston.ans.net!xlink.net!subnet.sub.net!nadia!zahn.gueldener.de!zahn!woerz
From: woerz@gueldener.de (Dieter Woerz)
Subject: Problem while doing query-replace-regexp
Message-ID: <1993Sep28.220616.14835@gueldener.de>
Followup-To: poster
Sender: usenet@gueldener.de (Netnews Poster)
Organization: Zahnaerztliches Rechenzentrum Dr. Gueldener GmbH, Stuttgart, FRG
Date: Wed, 29 Sep 1993 04:06:42 GMT
Lines: 28
Xref: galaxy.trc.rwcp.or.jp fj.editor.emacs:4071
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.editor.emacs&nb=4071&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

I am annoyed by a feature of emacs in query-replace and
query-replace-regexp. When I execute the command
query-replace-regexp \(.*\) abc/def/\1/xyz
I get different results depending on the input.
For the following inputs I get the associated outputs, but I would
like to get the string in brackets

1. uvw -> abc/def/uvw/xyz (abc/def/uvw/xyz)
2. Uvw -> Abc/Def/Uvw/Xyz (abc/def/Uvw/xyz)
3. UVW -> ABC/DEF/UVW/XYZ (abc/def/UVW/xyz)

As you see, in case 1 I get what I want, but in the cases 2 and 3 I
don't. The thing isn't even that predictable. If the source string
(uvw) contains a non-alphanumerical character the behaviour of the
replace changes to 1.

I would like to know, if there is some variable to set, so that I can
always get the strings in the brackets.

Thanks in advance

Dieter

--
Zahnaerztliches Rechenzentrum Dr. Gueldener GmbH
Dieter Woerz     INTERNET:       woerz@gueldener.de       
Postfach 101545       UUCP:           unido!zahn!woerz         
D-70014 StuttgartBITNET/EARN:    woerz%gueldener.de@unido.bitnet
