From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gabriel TEIXEIRA Newsgroups: gmane.emacs.help Subject: Re: Scrolling text erases the search highlight Date: Mon, 26 Jul 2010 10:20:46 +0200 Message-ID: <4C4D455E.2000100@sdesigns.eu> References: <4C3B0AE2.3060507@sdesigns.eu> <4C3C24DA.6080303@sdesigns.eu> <4C3C701B.7060704@sdesigns.eu> <4C495EC6.6070704@sdesigns.eu> <4C4974BE.9020500@easy-emacs.de> <9FA4FDC75D244DDA9979D6F2670C87E2@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1280132506 32466 80.91.229.12 (26 Jul 2010 08:21:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 26 Jul 2010 08:21:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 26 10:21:43 2010 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.69) (envelope-from ) id 1OdIwQ-0002SG-Kx for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jul 2010 10:21:43 +0200 Original-Received: from localhost ([127.0.0.1]:57626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdIwP-0004A6-SL for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jul 2010 04:21:41 -0400 Original-Received: from [140.186.70.92] (port=57108 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdIvh-00049t-O2 for help-gnu-emacs@gnu.org; Mon, 26 Jul 2010 04:21:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdIvb-0001Z2-Su for help-gnu-emacs@gnu.org; Mon, 26 Jul 2010 04:20:57 -0400 Original-Received: from a.mx.sdesigns.eu ([78.31.43.6]:8759) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OdIvb-0001YG-J2 for help-gnu-emacs@gnu.org; Mon, 26 Jul 2010 04:20:51 -0400 Original-Received: from [172.27.0.213] (kobe.france.sdesigns.com [172.27.0.213]) by mailhost.france.sdesigns.com (Postfix) with ESMTP id 8F670164072 for ; Mon, 26 Jul 2010 10:20:46 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 In-Reply-To: <9FA4FDC75D244DDA9979D6F2670C87E2@us.oracle.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:74290 Archived-At: On 23/07/2010 16:21, Drew Adams wrote: >>>> I am limited to scrolling the buffer that is near >>>> a result of the searched text, and if I try to move the >>>> cursor away in order to scroll more or just to >>>> change some text around it will erase the search too (and >>>> I come back with the original problem again). Any idea to >>>> how to solve that? >>>> >>> As far as I know, there is no way to get around that >>> problem today. I think the main issue is that in Emacs >>> point is always in the visible portion of the buffer. >>> >> IMHO there is a way, >> making functions doing de-highlighting conditional >> (unless (or (eq last-command-event 'next) >> (eq last-command-event 'prior)) >> >> for example >> (defun isearch-dehighlight () >> (unless (or (eq last-command-event 'next) >> (eq last-command-event 'prior)) >> (when isearch-overlay >> (delete-overlay isearch-overlay)))) >> >> same with lazy-highlight-cleanup and maybe some more. >> Produces visible effect here. >> Some more/other will arise nonetheless: >> isearch highlighting is done in visible portion of buffer only. >> Starting scroll with both changes as above will keep the >> highlights set so far, but not highlight further, now scrolled >> portion. >> > In addition to some of the other suggestions, you can try Icicles search, > including `icicle-occur'. You can keep the highlighting after searching (toggle > that on/off with `C-.' during search). And you can scroll anywhere during > search (or afterward) - point is not tied to a search hit when you move the > focus from the minibuffer to your search-hits buffer. > > This kind of search is quite different, so you will want to read up on it - do > not expect the same thing you are used to with isearch. > > Essentially, all search hits are found for an initial regexp, and they are > presented to you as completion candidates. You can navigate among the hits, and > you can narrow the set of hits by typing input that the candidates must also > match. (IOW, you can search within the set of search hits.) > > `icicle-occur' is a simplified version of this where the initial regexp is just > `.*', which matches all text in each line. `icicle-occur' is on `C-''. > `icicle-search' (more general) is on `C-`'. > > http://www.emacswiki.org/emacs/Icicles_-_Search_Commands%2c_Overview > > > > All the commands of icicles seems to be not defined (i.e. when I hit 'M-x icicles' and them 'Tab', the auto-completion says that there is no match). It seems that those commands are not built-in in my emacs. I'm using GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1). How can I download and install these commands or enable them while compiling? I compiled it by myself, so it is possible that I didn't selected the correct options while compiling. Thanks for your attention Gabriel