emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search/Replace manual changes.


From: David Kastrup
Subject: Re: Search/Replace manual changes.
Date: 25 Jun 2004 09:28:51 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Juri Linkov <address@hidden> writes:

> David Kastrup <address@hidden> writes:
> > Juri Linkov <address@hidden> writes:
> >> David Kastrup <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]