[Top][All Lists]

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

Re: Search/Replace manual changes.

From: Juri Linkov
Subject: Re: Search/Replace manual changes.
Date: Fri, 25 Jun 2004 03:18:11 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

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".

> I don't think we should remove an example for swapping strings that
> is accessible also to the beginner.

This is a bad example.  It teaches Emacs users to use Emacs inefficiently.

If this is a really very frequent operation that needed to be
documented in the Emacs manual then we should implement a new command
in replace.el and document it:

M-x swap-strings RET x RET y RET

Juri Linkov

reply via email to

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