all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: Search/Replace manual changes.
Date: Fri, 25 Jun 2004 03:18:11 +0300	[thread overview]
Message-ID: <87hdt0l40c.fsf@mail.jurta.org> (raw)
In-Reply-To: <x53c4k1ur4.fsf@lola.goethe.zz> (David Kastrup's message of "25 Jun 2004 00:00:47 +0200")

David Kastrup <dak@gnu.org> writes:
> Juri Linkov <juri@jurta.org> writes:
>> David Kastrup <dak@gnu.org> 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
http://www.jurta.org/emacs/

  reply	other threads:[~2004-06-25  0:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24 13:44 Search/Replace manual changes David Kastrup
2004-06-24 16:07 ` Juri Linkov
2004-06-24 22:00   ` David Kastrup
2004-06-25  0:18     ` Juri Linkov [this message]
2004-06-25  7:28       ` David Kastrup
2004-06-25 23:56   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hdt0l40c.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.