all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Scrolling text erases the search highlight
@ 2010-07-12 10:04 Gabriel TEIXEIRA
  0 siblings, 0 replies; 17+ messages in thread
From: Gabriel TEIXEIRA @ 2010-07-12 10:04 UTC (permalink / raw)
  To: help-gnu-emacs

Hello

Always when I do a search in emacs (by typing C-s search-string), emacs 
will highlight all the matching strings, but if I try to scroll the text 
to see the occurrences down or up into the text, the text highlight will 
disappear. Currently I'm workarounding it by pressing C-s C-s after each 
scroll, but I would like to know if there is an automatic way to do 
that. In other words, I would like to know what is the equivalent in 
emacs of the command / for man, less and vim.

Thanks in advance
Gabriel TEIXEIRA



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Scrolling text erases the search highlight
@ 2010-07-12 11:54 Gabriel TEIXEIRA
  0 siblings, 0 replies; 17+ messages in thread
From: Gabriel TEIXEIRA @ 2010-07-12 11:54 UTC (permalink / raw)
  To: help-gnu-emacs

Hello

Always when I do a search in emacs (by typing C-s search-string), emacs 
will highlight all the matching strings, but if I try to scroll the text 
to see the occurrences down or up into the text, the text highlight will 
disappear. Currently I'm workarounding it by pressing C-s C-s after each 
scroll, but I would like to know if there is an automatic way to do 
that. In other words, I would like to know what is the equivalent in 
emacs of the command / for man, less and vim.

Thanks in advance
Gabriel TEIXEIRA



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Scrolling text erases the search highlight
@ 2010-07-12 12:22 Gabriel TEIXEIRA
  0 siblings, 0 replies; 17+ messages in thread
From: Gabriel TEIXEIRA @ 2010-07-12 12:22 UTC (permalink / raw)
  To: help-gnu-emacs

Hello

Always when I do a search in emacs (by typing C-s search-string), emacs
will highlight all the matching strings, but if I try to scroll the text
to see the occurrences down or up into the text, the text highlight will
disappear. Currently I'm workarounding it by pressing C-s C-s after each
scroll, but I would like to know if there is an automatic way to do
that. In other words, I would like to know what is the equivalent in
emacs of the command / for man, less and vim.

Thanks in advance
Gabriel TEIXEIRA




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Scrolling text erases the search highlight
@ 2010-07-12 12:30 Gabriel TEIXEIRA
  2010-07-12 19:31 ` Qiang Guo
  0 siblings, 1 reply; 17+ messages in thread
From: Gabriel TEIXEIRA @ 2010-07-12 12:30 UTC (permalink / raw)
  To: help-gnu-emacs

hello

Always when I do a search in emacs (by typing C-s search-string), emacs
will highlight all the matching strings, but if I try to scroll the text
to see the occurrences down or up into the text, the text highlight will
disappear. Currently I'm workarounding it by pressing C-s C-s after each
scroll, but I would like to know if there is an automatic way to do
that. In other words, I would like to know what is the equivalent in
emacs of the command / for man, less and vim.

Thanks in advance
Gabriel TEIXEIRA




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-12 12:30 Scrolling text erases the search highlight Gabriel TEIXEIRA
@ 2010-07-12 19:31 ` Qiang Guo
  2010-07-13  7:14   ` Deniz Dogan
  0 siblings, 1 reply; 17+ messages in thread
From: Qiang Guo @ 2010-07-12 19:31 UTC (permalink / raw)
  To: Gabriel TEIXEIRA; +Cc: help-gnu-emacs


You may want to check variable 'isearch-allow-scroll'



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-12 19:31 ` Qiang Guo
@ 2010-07-13  7:14   ` Deniz Dogan
  2010-07-13  8:33     ` Gabriel TEIXEIRA
  0 siblings, 1 reply; 17+ messages in thread
From: Deniz Dogan @ 2010-07-13  7:14 UTC (permalink / raw)
  To: Qiang Guo; +Cc: help-gnu-emacs

2010/7/12 Qiang Guo <mcknight0219@gmail.com>:
>
> You may want to check variable 'isearch-allow-scroll'
>
>

This is a good suggestion. But you may also want to know about "M-s o".

M-s o runs the command occur, which is an interactive compiled Lisp
function in `replace.el'.

It is bound to M-s o.

(occur REGEXP &optional NLINES)

Show all lines in the current buffer containing a match for REGEXP.
This function can not handle matches that span more than one line.

-- 
Deniz Dogan



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-13  7:14   ` Deniz Dogan
@ 2010-07-13  8:33     ` Gabriel TEIXEIRA
  2010-07-13 13:33       ` Suvayu Ali
  2010-07-13 13:38       ` Deniz Dogan
  0 siblings, 2 replies; 17+ messages in thread
From: Gabriel TEIXEIRA @ 2010-07-13  8:33 UTC (permalink / raw)
  To: help-gnu-emacs

On 13/07/2010 09:14, Deniz Dogan wrote:

> 2010/7/12 Qiang Guo<mcknight0219@gmail.com>:
>    
>> You may want to check variable 'isearch-allow-scroll'
>>
>>
>>      
> This is a good suggestion. But you may also want to know about "M-s o".
>
> M-s o runs the command occur, which is an interactive compiled Lisp
> function in `replace.el'.
>
> It is bound to M-s o.
>
> (occur REGEXP&optional NLINES)
>
> Show all lines in the current buffer containing a match for REGEXP.
> This function can not handle matches that span more than one line.
>
>    
Thanks for the answers and sorry for the multiple messages, the M-s o is

very useful, but the isearch-allow-scroll doesn't work very well with me. It
will conserve the search if I do C-l or C-v, but won't if I use the mouse
scroll wheel or if I use the arrow keys to move the cursor (which are the
way I scroll the screen mostly). I want something that works similar to the
Linux man search, the vim or the gedit, that conserves the highlight as long
as the search is erased. Any other suggestions?




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-13  8:33     ` Gabriel TEIXEIRA
@ 2010-07-13 13:33       ` Suvayu Ali
  2010-07-13 13:38       ` Deniz Dogan
  1 sibling, 0 replies; 17+ messages in thread
From: Suvayu Ali @ 2010-07-13 13:33 UTC (permalink / raw)
  To: help-gnu-emacs

On Tuesday 13 July 2010 01:33 AM, Gabriel TEIXEIRA wrote:
> very useful, but the isearch-allow-scroll doesn't work very well with
> me. It
> will conserve the search if I do C-l or C-v, but won't if I use the mouse
> scroll wheel or if I use the arrow keys to move the cursor (which are the
> way I scroll the screen mostly). I want something that works similar to the
> Linux man search, the vim or the gedit, that conserves the highlight as
> long
> as the search is erased. Any other suggestions?

This is very strange, I tried it on emacs 24.0.50.1 when I read Qiang's 
response. And it worked like a charm. And now that you mention it, I 
tried it again on emacs 23.2.1. This time it behaves exactly as you 
describe!

-- 
Suvayu

Open source is the future. It sets us free.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-13  8:33     ` Gabriel TEIXEIRA
  2010-07-13 13:33       ` Suvayu Ali
@ 2010-07-13 13:38       ` Deniz Dogan
  2010-07-13 13:54         ` Gabriel TEIXEIRA
  1 sibling, 1 reply; 17+ messages in thread
From: Deniz Dogan @ 2010-07-13 13:38 UTC (permalink / raw)
  To: Gabriel TEIXEIRA; +Cc: help-gnu-emacs

2010/7/13 Gabriel TEIXEIRA <gabriel_teixeira@sdesigns.eu>:
> On 13/07/2010 09:14, Deniz Dogan wrote:
>
>> 2010/7/12 Qiang Guo<mcknight0219@gmail.com>:
>>
>>>
>>> You may want to check variable 'isearch-allow-scroll'
>>>
>>>
>>>
>>
>> This is a good suggestion. But you may also want to know about "M-s o".
>>
>> M-s o runs the command occur, which is an interactive compiled Lisp
>> function in `replace.el'.
>>
>> It is bound to M-s o.
>>
>> (occur REGEXP&optional NLINES)
>>
>> Show all lines in the current buffer containing a match for REGEXP.
>> This function can not handle matches that span more than one line.
>>
>>
>
> Thanks for the answers and sorry for the multiple messages, the M-s o is
>
> very useful, but the isearch-allow-scroll doesn't work very well with me. It
> will conserve the search if I do C-l or C-v, but won't if I use the mouse
> scroll wheel or if I use the arrow keys to move the cursor (which are the
> way I scroll the screen mostly). I want something that works similar to the
> Linux man search, the vim or the gedit, that conserves the highlight as long
> as the search is erased. Any other suggestions?
>
>
>

For what it's worth, scrolling using the mouse works fine using: GNU
Emacs 24.0.50.1 (i386-mingw-nt6.1.7600) of 2010-07-12 on 3249CTO

-- 
Deniz Dogan



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-13 13:38       ` Deniz Dogan
@ 2010-07-13 13:54         ` Gabriel TEIXEIRA
  2010-07-23  9:20           ` Gabriel TEIXEIRA
  0 siblings, 1 reply; 17+ messages in thread
From: Gabriel TEIXEIRA @ 2010-07-13 13:54 UTC (permalink / raw)
  To: help-gnu-emacs

On 13/07/2010 15:38, Deniz Dogan wrote:
> 2010/7/13 Gabriel TEIXEIRA<gabriel_teixeira@sdesigns.eu>:
>    
>> On 13/07/2010 09:14, Deniz Dogan wrote:
>>
>>      
>>> 2010/7/12 Qiang Guo<mcknight0219@gmail.com>:
>>>
>>>        
>>>> You may want to check variable 'isearch-allow-scroll'
>>>>
>>>>
>>>>
>>>>          
>>> This is a good suggestion. But you may also want to know about "M-s o".
>>>
>>> M-s o runs the command occur, which is an interactive compiled Lisp
>>> function in `replace.el'.
>>>
>>> It is bound to M-s o.
>>>
>>> (occur REGEXP&optional NLINES)
>>>
>>> Show all lines in the current buffer containing a match for REGEXP.
>>> This function can not handle matches that span more than one line.
>>>
>>>
>>>        
>> Thanks for the answers and sorry for the multiple messages, the M-s o is
>>
>> very useful, but the isearch-allow-scroll doesn't work very well with me. It
>> will conserve the search if I do C-l or C-v, but won't if I use the mouse
>> scroll wheel or if I use the arrow keys to move the cursor (which are the
>> way I scroll the screen mostly). I want something that works similar to the
>> Linux man search, the vim or the gedit, that conserves the highlight as long
>> as the search is erased. Any other suggestions?
>>
>>
>>
>>      
> For what it's worth, scrolling using the mouse works fine using: GNU
> Emacs 24.0.50.1 (i386-mingw-nt6.1.7600) of 2010-07-12 on 3249CTO
>
>    
Yes, I'm using version 23.1.1. I couldn't realize that this could be the 
version of emacs. I will install a newer version to check it out. 
Hopefully won't break with my .emacs config file :)
Many many thanks for your help



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-13 13:54         ` Gabriel TEIXEIRA
@ 2010-07-23  9:20           ` Gabriel TEIXEIRA
  2010-07-23  9:25             ` Deniz Dogan
  0 siblings, 1 reply; 17+ messages in thread
From: Gabriel TEIXEIRA @ 2010-07-23  9:20 UTC (permalink / raw)
  To: help-gnu-emacs

On 13/07/2010 15:54, Gabriel TEIXEIRA wrote:
> On 13/07/2010 15:38, Deniz Dogan wrote:
>> 2010/7/13 Gabriel TEIXEIRA<gabriel_teixeira@sdesigns.eu>:
>>> On 13/07/2010 09:14, Deniz Dogan wrote:
>>>
>>>> 2010/7/12 Qiang Guo<mcknight0219@gmail.com>:
>>>>
>>>>> You may want to check variable 'isearch-allow-scroll'
>>>>>
>>>>>
>>>>>
>>>> This is a good suggestion. But you may also want to know about "M-s 
>>>> o".
>>>>
>>>> M-s o runs the command occur, which is an interactive compiled Lisp
>>>> function in `replace.el'.
>>>>
>>>> It is bound to M-s o.
>>>>
>>>> (occur REGEXP&optional NLINES)
>>>>
>>>> Show all lines in the current buffer containing a match for REGEXP.
>>>> This function can not handle matches that span more than one line.
>>>>
>>>>
>>> Thanks for the answers and sorry for the multiple messages, the M-s 
>>> o is
>>>
>>> very useful, but the isearch-allow-scroll doesn't work very well 
>>> with me. It
>>> will conserve the search if I do C-l or C-v, but won't if I use the 
>>> mouse
>>> scroll wheel or if I use the arrow keys to move the cursor (which 
>>> are the
>>> way I scroll the screen mostly). I want something that works similar 
>>> to the
>>> Linux man search, the vim or the gedit, that conserves the highlight 
>>> as long
>>> as the search is erased. Any other suggestions?
>>>
>>>
>>>
>> For what it's worth, scrolling using the mouse works fine using: GNU
>> Emacs 24.0.50.1 (i386-mingw-nt6.1.7600) of 2010-07-12 on 3249CTO
>>
> Yes, I'm using version 23.1.1. I couldn't realize that this could be 
> the version of emacs. I will install a newer version to check it out. 
> Hopefully won't break with my .emacs config file :)
> Many many thanks for your help
>
>
Hello back

After I recompiled my emacs to the 24.0.50.1, the problems of scrolling 
were solved mostly, but now after some time of usage I noticed a weird 
behaviour: Now that I can scroll freely, I noticed that it won't scroll 
beyond the position were the cursor is located (meaning that if I have 
one result in the line 150 and my text has 1000 lines and my buffer is 
80 lines tall, I can't scroll to see above the line 70 nor after the 
line 230), so 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?

Thanks for the attention
Gabriel Teixeira



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-23  9:20           ` Gabriel TEIXEIRA
@ 2010-07-23  9:25             ` Deniz Dogan
  2010-07-23 10:53               ` Andreas Röhler
  0 siblings, 1 reply; 17+ messages in thread
From: Deniz Dogan @ 2010-07-23  9:25 UTC (permalink / raw)
  To: Gabriel TEIXEIRA; +Cc: help-gnu-emacs

2010/7/23 Gabriel TEIXEIRA <gabriel_teixeira@sdesigns.eu>:
> On 13/07/2010 15:54, Gabriel TEIXEIRA wrote:
>>
>> On 13/07/2010 15:38, Deniz Dogan wrote:
>>>
>>> 2010/7/13 Gabriel TEIXEIRA<gabriel_teixeira@sdesigns.eu>:
>>>>
>>>> On 13/07/2010 09:14, Deniz Dogan wrote:
>>>>
>>>>> 2010/7/12 Qiang Guo<mcknight0219@gmail.com>:
>>>>>
>>>>>> You may want to check variable 'isearch-allow-scroll'
>>>>>>
>>>>>>
>>>>>>
>>>>> This is a good suggestion. But you may also want to know about "M-s o".
>>>>>
>>>>> M-s o runs the command occur, which is an interactive compiled Lisp
>>>>> function in `replace.el'.
>>>>>
>>>>> It is bound to M-s o.
>>>>>
>>>>> (occur REGEXP&optional NLINES)
>>>>>
>>>>> Show all lines in the current buffer containing a match for REGEXP.
>>>>> This function can not handle matches that span more than one line.
>>>>>
>>>>>
>>>> Thanks for the answers and sorry for the multiple messages, the M-s o is
>>>>
>>>> very useful, but the isearch-allow-scroll doesn't work very well with
>>>> me. It
>>>> will conserve the search if I do C-l or C-v, but won't if I use the
>>>> mouse
>>>> scroll wheel or if I use the arrow keys to move the cursor (which are
>>>> the
>>>> way I scroll the screen mostly). I want something that works similar to
>>>> the
>>>> Linux man search, the vim or the gedit, that conserves the highlight as
>>>> long
>>>> as the search is erased. Any other suggestions?
>>>>
>>>>
>>>>
>>> For what it's worth, scrolling using the mouse works fine using: GNU
>>> Emacs 24.0.50.1 (i386-mingw-nt6.1.7600) of 2010-07-12 on 3249CTO
>>>
>> Yes, I'm using version 23.1.1. I couldn't realize that this could be the
>> version of emacs. I will install a newer version to check it out. Hopefully
>> won't break with my .emacs config file :)
>> Many many thanks for your help
>>
>>
> Hello back
>
> After I recompiled my emacs to the 24.0.50.1, the problems of scrolling were
> solved mostly, but now after some time of usage I noticed a weird behaviour:
> Now that I can scroll freely, I noticed that it won't scroll beyond the
> position were the cursor is located (meaning that if I have one result in
> the line 150 and my text has 1000 lines and my buffer is 80 lines tall, I
> can't scroll to see above the line 70 nor after the line 230), so 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.

-- 
Deniz Dogan



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-23  9:25             ` Deniz Dogan
@ 2010-07-23 10:53               ` Andreas Röhler
  2010-07-23 11:29                 ` Gabriel TEIXEIRA
  2010-07-23 14:21                 ` Drew Adams
  0 siblings, 2 replies; 17+ messages in thread
From: Andreas Röhler @ 2010-07-23 10:53 UTC (permalink / raw)
  To: help-gnu-emacs

Am 23.07.2010 11:25, schrieb Deniz Dogan:
> 2010/7/23 Gabriel TEIXEIRA<gabriel_teixeira@sdesigns.eu>:
>> On 13/07/2010 15:54, Gabriel TEIXEIRA wrote:
>>>
>>> On 13/07/2010 15:38, Deniz Dogan wrote:
>>>>
>>>> 2010/7/13 Gabriel TEIXEIRA<gabriel_teixeira@sdesigns.eu>:
>>>>>
>>>>> On 13/07/2010 09:14, Deniz Dogan wrote:
>>>>>
>>>>>> 2010/7/12 Qiang Guo<mcknight0219@gmail.com>:
>>>>>>
>>>>>>> You may want to check variable 'isearch-allow-scroll'
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> This is a good suggestion. But you may also want to know about "M-s o".
>>>>>>
>>>>>> M-s o runs the command occur, which is an interactive compiled Lisp
>>>>>> function in `replace.el'.
>>>>>>
>>>>>> It is bound to M-s o.
>>>>>>
>>>>>> (occur REGEXP&optional NLINES)
>>>>>>
>>>>>> Show all lines in the current buffer containing a match for REGEXP.
>>>>>> This function can not handle matches that span more than one line.
>>>>>>
>>>>>>
>>>>> Thanks for the answers and sorry for the multiple messages, the M-s o is
>>>>>
>>>>> very useful, but the isearch-allow-scroll doesn't work very well with
>>>>> me. It
>>>>> will conserve the search if I do C-l or C-v, but won't if I use the
>>>>> mouse
>>>>> scroll wheel or if I use the arrow keys to move the cursor (which are
>>>>> the
>>>>> way I scroll the screen mostly). I want something that works similar to
>>>>> the
>>>>> Linux man search, the vim or the gedit, that conserves the highlight as
>>>>> long
>>>>> as the search is erased. Any other suggestions?
>>>>>
>>>>>
>>>>>
>>>> For what it's worth, scrolling using the mouse works fine using: GNU
>>>> Emacs 24.0.50.1 (i386-mingw-nt6.1.7600) of 2010-07-12 on 3249CTO
>>>>
>>> Yes, I'm using version 23.1.1. I couldn't realize that this could be the
>>> version of emacs. I will install a newer version to check it out. Hopefully
>>> won't break with my .emacs config file :)
>>> Many many thanks for your help
>>>
>>>
>> Hello back
>>
>> After I recompiled my emacs to the 24.0.50.1, the problems of scrolling were
>> solved mostly, but now after some time of usage I noticed a weird behaviour:
>> Now that I can scroll freely, I noticed that it won't scroll beyond the
>> position were the cursor is located (meaning that if I have one result in
>> the line 150 and my text has 1000 lines and my buffer is 80 lines tall, I
>> can't scroll to see above the line 70 nor after the line 230), so 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.
>

Hi,

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.


Cheers


Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-23 10:53               ` Andreas Röhler
@ 2010-07-23 11:29                 ` Gabriel TEIXEIRA
  2010-07-23 14:21                 ` Drew Adams
  1 sibling, 0 replies; 17+ messages in thread
From: Gabriel TEIXEIRA @ 2010-07-23 11:29 UTC (permalink / raw)
  To: help-gnu-emacs

On 23/07/2010 12:53, Andreas Röhler wrote:
> Am 23.07.2010 11:25, schrieb Deniz Dogan:
>> 2010/7/23 Gabriel TEIXEIRA<gabriel_teixeira@sdesigns.eu>:
>>> On 13/07/2010 15:54, Gabriel TEIXEIRA wrote:
>>>>
>>>> On 13/07/2010 15:38, Deniz Dogan wrote:
>>>>>
>>>>> 2010/7/13 Gabriel TEIXEIRA<gabriel_teixeira@sdesigns.eu>:
>>>>>>
>>>>>> On 13/07/2010 09:14, Deniz Dogan wrote:
>>>>>>
>>>>>>> 2010/7/12 Qiang Guo<mcknight0219@gmail.com>:
>>>>>>>
>>>>>>>> You may want to check variable 'isearch-allow-scroll'
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> This is a good suggestion. But you may also want to know about 
>>>>>>> "M-s o".
>>>>>>>
>>>>>>> M-s o runs the command occur, which is an interactive compiled Lisp
>>>>>>> function in `replace.el'.
>>>>>>>
>>>>>>> It is bound to M-s o.
>>>>>>>
>>>>>>> (occur REGEXP&optional NLINES)
>>>>>>>
>>>>>>> Show all lines in the current buffer containing a match for REGEXP.
>>>>>>> This function can not handle matches that span more than one line.
>>>>>>>
>>>>>>>
>>>>>> Thanks for the answers and sorry for the multiple messages, the 
>>>>>> M-s o is
>>>>>>
>>>>>> very useful, but the isearch-allow-scroll doesn't work very well 
>>>>>> with
>>>>>> me. It
>>>>>> will conserve the search if I do C-l or C-v, but won't if I use the
>>>>>> mouse
>>>>>> scroll wheel or if I use the arrow keys to move the cursor (which 
>>>>>> are
>>>>>> the
>>>>>> way I scroll the screen mostly). I want something that works 
>>>>>> similar to
>>>>>> the
>>>>>> Linux man search, the vim or the gedit, that conserves the 
>>>>>> highlight as
>>>>>> long
>>>>>> as the search is erased. Any other suggestions?
>>>>>>
>>>>>>
>>>>>>
>>>>> For what it's worth, scrolling using the mouse works fine using: GNU
>>>>> Emacs 24.0.50.1 (i386-mingw-nt6.1.7600) of 2010-07-12 on 3249CTO
>>>>>
>>>> Yes, I'm using version 23.1.1. I couldn't realize that this could 
>>>> be the
>>>> version of emacs. I will install a newer version to check it out. 
>>>> Hopefully
>>>> won't break with my .emacs config file :)
>>>> Many many thanks for your help
>>>>
>>>>
>>> Hello back
>>>
>>> After I recompiled my emacs to the 24.0.50.1, the problems of 
>>> scrolling were
>>> solved mostly, but now after some time of usage I noticed a weird 
>>> behaviour:
>>> Now that I can scroll freely, I noticed that it won't scroll beyond the
>>> position were the cursor is located (meaning that if I have one 
>>> result in
>>> the line 150 and my text has 1000 lines and my buffer is 80 lines 
>>> tall, I
>>> can't scroll to see above the line 70 nor after the line 230), so 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.
>>
>
> Hi,
>
> 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.
>
>
> Cheers
>
>
> Andreas
>
> -- 
> https://code.launchpad.net/~a-roehler/python-mode
> https://code.launchpad.net/s-x-emacs-werkstatt/
>
>
>
>
Well, I tried just the isearch-dehighlight, but it doesn't work at all. 
I will try to find by myself the solution using the tips you gave me 
(Not before I master emacs a little bit further, I'm just starting...).

Vielen Dank!
Gabriel Teixeira



^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Scrolling text erases the search highlight
  2010-07-23 10:53               ` Andreas Röhler
  2010-07-23 11:29                 ` Gabriel TEIXEIRA
@ 2010-07-23 14:21                 ` Drew Adams
  2010-07-26  8:20                   ` Gabriel TEIXEIRA
  1 sibling, 1 reply; 17+ messages in thread
From: Drew Adams @ 2010-07-23 14:21 UTC (permalink / raw)
  To: help-gnu-emacs

> >> 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




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Scrolling text erases the search highlight
  2010-07-23 14:21                 ` Drew Adams
@ 2010-07-26  8:20                   ` Gabriel TEIXEIRA
  2010-07-26 13:51                     ` Drew Adams
  0 siblings, 1 reply; 17+ messages in thread
From: Gabriel TEIXEIRA @ 2010-07-26  8:20 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Scrolling text erases the search highlight
  2010-07-26  8:20                   ` Gabriel TEIXEIRA
@ 2010-07-26 13:51                     ` Drew Adams
  0 siblings, 0 replies; 17+ messages in thread
From: Drew Adams @ 2010-07-26 13:51 UTC (permalink / raw)
  To: 'Gabriel TEIXEIRA', help-gnu-emacs

> 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.

Icicles is not included in vanilla Emacs. If you want to try it, you need to
download the files.  This page tells you how:
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Libraries

This is the main Icicles page (table of contents for the other pages):
http://www.emacswiki.org/emacs/Icicles

These pages provide in-depth overviews:
http://www.emacswiki.org/emacs/EmacsNewbieWithIcicles
http://www.emacswiki.org/emacs/Icicles_-_Nutshell_View

To send a bug report, use `M-x icicle-send-bug-report' or use this page:
http://www.emacswiki.org/emacs/IciclesIssues





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-07-26 13:51 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-12 12:30 Scrolling text erases the search highlight Gabriel TEIXEIRA
2010-07-12 19:31 ` Qiang Guo
2010-07-13  7:14   ` Deniz Dogan
2010-07-13  8:33     ` Gabriel TEIXEIRA
2010-07-13 13:33       ` Suvayu Ali
2010-07-13 13:38       ` Deniz Dogan
2010-07-13 13:54         ` Gabriel TEIXEIRA
2010-07-23  9:20           ` Gabriel TEIXEIRA
2010-07-23  9:25             ` Deniz Dogan
2010-07-23 10:53               ` Andreas Röhler
2010-07-23 11:29                 ` Gabriel TEIXEIRA
2010-07-23 14:21                 ` Drew Adams
2010-07-26  8:20                   ` Gabriel TEIXEIRA
2010-07-26 13:51                     ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2010-07-12 12:22 Gabriel TEIXEIRA
2010-07-12 11:54 Gabriel TEIXEIRA
2010-07-12 10:04 Gabriel TEIXEIRA

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.