From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: weber Newsgroups: gmane.emacs.help Subject: Re: Isearch functionality Date: Tue, 31 Jul 2007 14:18:31 -0000 Organization: http://groups.google.com Message-ID: <1185891511.852745.256300@22g2000hsm.googlegroups.com> References: <1185888195.759240.180330@d55g2000hsg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1185892913 26122 80.91.229.12 (31 Jul 2007 14:41:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jul 2007 14:41:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 31 16:41:46 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IFsuv-0006yF-Jr for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Jul 2007 16:41:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFsuv-0002QW-3T for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Jul 2007 10:41:45 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!22g2000hsm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 56 Original-NNTP-Posting-Host: 200.208.129.96 Original-X-Trace: posting.google.com 1185891512 18898 127.0.0.1 (31 Jul 2007 14:18:32 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 31 Jul 2007 14:18:32 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 fw.datacom-telematica.com.br:3128 (squid/2.5.STABLE6) Complaints-To: groups-abuse@google.com Injection-Info: 22g2000hsm.googlegroups.com; posting-host=200.208.129.96; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:150649 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46227 Archived-At: On 31 jul, 10:59, "Drew Adams" 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