From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: Re: Replacement Date: Fri, 28 Oct 2005 09:03:15 +0300 Organization: JURTA Message-ID: <871x268oeo.fsf@jurta.org> References: <20051027154423.8C17332F28@lifc.univ-fcomte.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1130481509 27952 80.91.229.2 (28 Oct 2005 06:38:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2005 06:38:29 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, hufflen@lifc.univ-fcomte.fr Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 28 08:38:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EVNsA-0005zT-Nn for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Oct 2005 08:37:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVNs9-00033e-8g for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Oct 2005 02:37:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EVNWd-00085d-CK for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2005 02:15:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EVNWa-00083b-2w for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2005 02:15:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVNWY-00082Z-BT for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2005 02:15:34 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EVNWY-0001Wr-6x for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2005 02:15:34 -0400 Original-Received: from mail.neti.ee (80-235-34-60-dsl.mus.estpak.ee [80.235.34.60]) by Relayhost1.neti.ee (Postfix) with ESMTP id EBF5A16EF; Fri, 28 Oct 2005 09:15:46 +0300 (EEST) Original-To: Kevin Rodgers In-Reply-To: (Kevin Rodgers's message of "Thu, 27 Oct 2005 12:48:18 -0600") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:13750 Archived-At: >> Let us consider a source text for LateX and assume that we want to >> replace the command for an accented letter by the accented letter >> itself. For example, replacing \`{a} by =C3 using the accurate >> coding. If we look into the documentation and would like to >> perform this operation by means of a Lisp code, that should be: >> (beginning-of-buffer) >> (while (re-search-forward "\\\B`{a}" nil t) >> (replace-match "=C3 " nil nil)) >> Unfortunately, the replacement is \`{a} =3D=3D=3D=3D> \=C3=20 > > "\\\B..." is the same as "\\B...". I think you meant "\\\\B..." Unquoted string "\\\\B" is `\\B' which matches two characters `\' and `B'. I don't think this is what is wanted. But "\\\\\\B" will work fine, since, when unquoted, it is equal to `\\\B' which matches one character `\', and the empty string not at word boundary with `\B'. --=20 Juri Linkov http://www.jurta.org/emacs/