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/Replace manual changes. Date: 25 Jun 2004 09:28:51 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87zn6tq77m.fsf@mail.jurta.org> <87hdt0l40c.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 1088148555 30383 80.91.224.253 (25 Jun 2004 07:29:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Jun 2004 07:29:15 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jun 25 09:29:07 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 1Bdl91-0006u9-00 for ; Fri, 25 Jun 2004 09:29:07 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bdl90-0001NH-00 for ; Fri, 25 Jun 2004 09:29:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BdlAS-0002MU-Eh for emacs-devel@quimby.gnus.org; Fri, 25 Jun 2004 03:30:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BdlAP-0002MF-Lw for emacs-devel@gnu.org; Fri, 25 Jun 2004 03:30:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BdlAP-0002M2-7W for emacs-devel@gnu.org; Fri, 25 Jun 2004 03:30:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BdlAP-0002Lz-3g for emacs-devel@gnu.org; Fri, 25 Jun 2004 03:30:33 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bdl8o-00006F-0M for emacs-devel@gnu.org; Fri, 25 Jun 2004 03:28:54 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1Bdl8m-0005as-SX; Fri, 25 Jun 2004 03:28:53 -0400 Original-To: Juri Linkov In-Reply-To: <87hdt0l40c.fsf@mail.jurta.org> Original-Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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:25245 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25245 Juri Linkov writes: > David Kastrup writes: > > Juri Linkov writes: > >> David Kastrup writes: > >> > @example > >> > -M-x query-replace @key{RET} x @key{RET} @@TEMP@@ @key{RET} > >> > -M-x query-replace @key{RET} y @key{RET} x @key{RET} > >> > -M-x query-replace @key{RET} @@TEMP@@ @key{RET} y @key{RET} > >> > +M-x replace-string @key{RET} x @key{RET} @@TEMP@@ @key{RET} > >> > +M-< M-x replace-string @key{RET} y @key{RET} x @key{RET} > >> > +M-< M-x replace-string @key{RET} @@TEMP@@ @key{RET} y @key{RET} > >> > @end example > >> > >> I think this example should be removed from the Emacs manual > >> completely. Using three commands to exchange words is too clumsy. > >> When reading the Emacs manual the users will mis-spend their time at > >> understanding and remembering this example not knowing that a better > >> method to do this is shown in the next chapter. > > > > But the method in the next chapter requires a basic Lisp > > understanding. It is an advanced technique. Granted, probably one of > > the easiest, and probably a nice incentive for learning, but it is > > still an advanced technique. > > It's not difficult even for beginners to substitute own values > for "x" and "y". But the beginner would not want to look up the required Lisp strings for a simple operation each time in the manual. The above is just a _trick_: once you are told it, it sticks. And it is a short, yet not non-trivial combination of things. What kind of example would you prefer? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum