unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "Emacs-Devel" <emacs-devel@gnu.org>
Subject: be able to replace during isearch
Date: Sat, 30 Jun 2007 18:07:39 -0700	[thread overview]
Message-ID: <BDEIJAFNGDOAGCJIPKPBGEGKCFAA.drew.adams@oracle.com> (raw)

I have this feature in Icicles search, but the idea is not dependent on
Icicles. I think that a feature like this would also be useful to add to
isearch.

The idea is that you would not need to leave isearch to perform
replacements. Whenever you wanted to replace the current search occurrence,
you would hit a certain key. The first time you do this, you would be asked
for the replacement string.

The main advantage, besides not needing to exit isearch, is that instead of
being queried for each potential replacement, one by one, you replace only
those you want upon demand. You might not even have the intention of
performing replacement until you happened to notice, while searching, that
you wanted to change something. A minor advantage is that you can also
search-and-replace backward.

Nice-to-haves: In Icicles search, you can use any replacement expression
that is accepted by `query-replace-regexp', and there are additional key
bindings during search to (1) replace all and (2) redefine the replacement
to use. These would also be useful additions for isearch.

I'm not suggesting this as a replacement(!) for query-replace, but as an
enhancement to isearch. Query-replace is a different UI, and each has its
advantages.

Here is a bit more explanation of this feature in Icicles, but, as I say,
the idea is not Icicles-specific:
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Search-And-Replace.

             reply	other threads:[~2007-07-01  1:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-01  1:07 Drew Adams [this message]
2007-07-01 13:37 ` be able to replace during isearch Mathias Dahl
2007-07-01 14:02   ` Drew Adams
2007-07-01 20:59 ` Juri Linkov
2007-07-01 22:37   ` Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=BDEIJAFNGDOAGCJIPKPBGEGKCFAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).