From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Search nodes in Emacs manual Date: 19 Jun 2004 20:52:19 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87acz01wxi.fsf@mail.jurta.org> <87oenfo0d7.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1087671175 17741 80.91.224.253 (19 Jun 2004 18:52:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 Jun 2004 18:52:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Jun 19 20:52:48 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BbkxM-0005eF-00 for ; Sat, 19 Jun 2004 20:52:48 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BbkxL-0007vM-00 for ; Sat, 19 Jun 2004 20:52:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BbkyV-0001bK-To for emacs-devel@quimby.gnus.org; Sat, 19 Jun 2004 14:53:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BbkyT-0001bF-N9 for emacs-devel@gnu.org; Sat, 19 Jun 2004 14:53:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BbkyT-0001b2-8V for emacs-devel@gnu.org; Sat, 19 Jun 2004 14:53:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BbkyT-0001au-4p for emacs-devel@gnu.org; Sat, 19 Jun 2004 14:53:57 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bbkww-0007ch-Hk for emacs-devel@gnu.org; Sat, 19 Jun 2004 14:52:23 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1Bbkwu-0000rY-TZ; Sat, 19 Jun 2004 14:52:21 -0400 Original-To: Juri Linkov In-Reply-To: <87oenfo0d7.fsf@mail.jurta.org> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Lines: 31 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25112 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25112 Juri Linkov writes: > David Kastrup writes: > > Juri Linkov writes: > >> But perhaps with the latest changes this example can be replaced > >> with more advanced like this: > >> > >> M-x replace-regexp \(x\|y\) \,(if (equal \& "x") "y" > >> "x") > > > > Cute. Of course \(x\|y\) is shorter as [xy] > > I intended to make it as an example of exchanging words which might > be more useful than exchanging characters. So that example > could be rewritten as something like below, and be placed into > (info "(emacs)Regexp Replace") instead of the current > (info "(emacs)Unconditional Replace"), or to the same node > where you might document this new feature. > > M-x replace-regexp \(ab\|cd\) > \,(if (equal \& "ab") "cd" "ab") You'd better use string=, or font-lock might surprise you. How about M-x replace-regexp \(\(ab\)\|cd\) \,(if \2 "cd" "ab") -- David Kastrup, Kriemhildstr. 15, 44793 Bochum