all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Jacobson <jidanni@dman.ddts.net>
Subject: Re: please implement query-exchange
Date: 19 Nov 2002 07:37:59 +0800	[thread overview]
Message-ID: <87heeejvoo.fsf@jidanni.org> (raw)
In-Reply-To: 9003-Mon18Nov2002210929+0200-eliz@is.elta.co.il

Um, there is some misunderstanding here.  I want someone to add a
command to emacs: (query-exchange "x" "y") which will change all x's
to y's, just like query-replace, but it will also change all y's to
x's at the same time.

Eli on the other hand feels the existing tools with proper instruction
are enough.

I say that adding my nice command is much more convenient for the
simple user than the Eli Boot Camp: It all started when I wanted to
exchange x and y in

>>> atan(x()-$xc,y()-$yc).
>> 
Eli> Can't you do that with query-replace-regexp using parenthesized
Eli> subexpressions and the \N feature (where N is a digit)?
>> 
>> Maybe you could, and if so maybe you could write up just how one does
>> it and add it to the Info page.  Sounds rather advanced.

Eli> M-x query-replace-regexp RET
Eli> \(x\)\(.*\)\(xc\)\(.*\)\(y\)\(.*\)\(yc\) RET \5\2\7\4\1\6\3 RET

Eli> does this for me.  Is it really advanced?

Naw.  Kid stuff. \5\2\7\4\1\6\3 ? Why of course.  Mom taught that to
me when I was 5 years old.

$ echo 'atan(x()-$xc,y()-$yc)'|tr x B|tr y x|tr B y
atan(y()-$yc,x()-$xc)
is all I am trying to do, by the way.
-- 
http://jidanni.org/ Taiwan(04)25854780

  parent reply	other threads:[~2002-11-18 23:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-16  1:59 please implement query-exchange Dan Jacobson
2002-11-16 18:14 ` Eli Zaretskii
     [not found]   ` <8765uvpx52.fsf@jidanni.org>
     [not found]     ` <9003-Mon18Nov2002210929+0200-eliz@is.elta.co.il>
2002-11-18 23:37       ` Dan Jacobson [this message]
2002-11-19  6:57         ` Eli Zaretskii
2002-11-19 21:57           ` Dan Jacobson
2002-11-19 17:25   ` Ami Fischman
2002-11-19 17:59     ` Eli Zaretskii
2002-11-19 19:18       ` Ami Fischman
2002-11-19 22:10         ` Francesco Potorti`
2002-11-19 23:43           ` Dan Jacobson
2002-11-20  1:03           ` Dan Jacobson
2002-11-20 21:29             ` Ami Fischman
2002-11-21 23:22               ` Dan Jacobson
2002-11-21 17:12             ` 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=87heeejvoo.fsf@jidanni.org \
    --to=jidanni@dman.ddts.net \
    /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.