all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: weber <hugows@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Isearch functionality
Date: Tue, 31 Jul 2007 14:18:31 -0000	[thread overview]
Message-ID: <1185891511.852745.256300@22g2000hsm.googlegroups.com> (raw)
In-Reply-To: <mailman.4162.1185890445.32220.help-gnu-emacs@gnu.org>

On 31 jul, 10:59, "Drew Adams" <drew.ad...@oracle.com> wrote:
> > I'd like to implement a command inside isearch that deletes the
> > current match _from the buffer_ (not from the search string)
>
> > This would be very useful since many times the search string you are
> > looking for is exactly what you want to remove, and it may be
> > something inside a word, so you can't just end isearch and do a kill
> > word. Do you get me ?
>
> > Anyway, I'd really appreciate some tips on how to implement this.
> > Maybe one could search the buffer for the specific type of overlay for
> > current match??
>
> Any of these ways:
>
> 1. End Isearch when you find what you want to delete. Then `C-@ C-r C-r'.
>
> 2. Use isearch+.el. You can choose to end Isearch with the search target
> selected.
>
> 3. Use Icicles search, and replace search hits on the fly (with nothing, in
> this case).
>
> For #1 and #2, just hit C-w to delete the search hit, or, if you use
> `delete-selection-mode', just hit Backspace.
>
> #1 and #2 require you to exit Isearch; #3 lets you delete any number of
> selected search hits without exiting search.
>
> For #2: seehttp://www.emacswiki.org/cgi-bin/wiki/IsearchPlus.
>
> For #3: seehttp://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Search_Commands%2c_Ov...,http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Search-And-Replace.

Many thanks for your answer, it was very complete.
Isearch+ is pretty much what I want :)

Also i had this snippet to force isearch to always put the cursor in
the beginning of the match:

(defun custom-goto-match-beginning ()
  "Use with isearch hook to end search at first char of match."
   (when isearch-forward (goto-char isearch-other-end)))

which i just changed to:

(defun custom-goto-match-beginning ()
  "Use with isearch hook to end search at first char of match."
  (when isearch-forward (exchange-point-and-mark)))

to work with isearch+.

Cheers,
weber

  parent reply	other threads:[~2007-07-31 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 13:23 Isearch functionality weber
2007-07-31 13:59 ` Drew Adams
     [not found] ` <mailman.4162.1185890445.32220.help-gnu-emacs@gnu.org>
2007-07-31 14:18   ` weber [this message]
2007-07-31 16:59 ` Joel J. Adamson
2007-08-01 13:35   ` weber
2007-08-04  8:48 ` Dieter Wilhelm
     [not found] ` <mailman.4378.1186217273.32220.help-gnu-emacs@gnu.org>
2007-08-04 15:03   ` weber

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=1185891511.852745.256300@22g2000hsm.googlegroups.com \
    --to=hugows@gmail.com \
    --cc=help-gnu-emacs@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.