unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Leaving isearch-mode and keeping the highlite
@ 2005-08-10 23:03 Lennart Borgman
  2005-08-10 23:20 ` Drew Adams
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Lennart Borgman @ 2005-08-10 23:03 UTC (permalink / raw)


I would find it very helpful to be able to leave isearch-mode but keep 
the highlite. Is this something other would find helpful too?

It is of course a new feature, but it can possible not break anything 
(except isearch highliting but that is easy to check). It we want this I 
would suggest to put it on C-RET or S-RET in isearch-mode-map. The main 
question is perhaps if we want it.

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

* RE: Leaving isearch-mode and keeping the highlite
  2005-08-10 23:03 Leaving isearch-mode and keeping the highlite Lennart Borgman
@ 2005-08-10 23:20 ` Drew Adams
  2005-08-10 23:42   ` Lennart Borgman
  2005-08-11  0:27 ` Juri Linkov
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2005-08-10 23:20 UTC (permalink / raw)


    I would find it very helpful to be able to leave isearch-mode but keep
    the highlite.... put it on C-RET or S-RET in isearch-mode-map.

Could be useful. The main question is how to later get rid of it. Perhaps
the next isearch could do that, or let isearch toggle it (see below).

Turning it on by a particular exit key sequence is not the best way. I would
rather have that be a user option (like case-fold-search), and be able to
toggle the option while in isearch (like we can toggle case-fold-search).

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

* Re: Leaving isearch-mode and keeping the highlite
  2005-08-10 23:20 ` Drew Adams
@ 2005-08-10 23:42   ` Lennart Borgman
  2005-08-11  2:20     ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2005-08-10 23:42 UTC (permalink / raw)
  Cc: Emacs Devel

Drew Adams wrote:

>    I would find it very helpful to be able to leave isearch-mode but keep
>    the highlite.... put it on C-RET or S-RET in isearch-mode-map.
>
>Could be useful. The main question is how to later get rid of it. Perhaps
>the next isearch could do that, or let isearch toggle it (see below).
>  
>
Yes the next search will clear it.

>Turning it on by a particular exit key sequence is not the best way. I would
>rather have that be a user option (like case-fold-search), and be able to
>toggle the option while in isearch (like we can toggle case-fold-search).
>  
>
Too cumbersome to me. Sometimes I want to leave the highlite there, 
sometimes not.

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

* Re: Leaving isearch-mode and keeping the highlite
  2005-08-10 23:03 Leaving isearch-mode and keeping the highlite Lennart Borgman
  2005-08-10 23:20 ` Drew Adams
@ 2005-08-11  0:27 ` Juri Linkov
  2005-08-11  0:58   ` Lennart Borgman
  2005-08-11 20:40 ` Richard M. Stallman
  2005-08-12  7:41 ` Emilio Lopes
  3 siblings, 1 reply; 10+ messages in thread
From: Juri Linkov @ 2005-08-11  0:27 UTC (permalink / raw)
  Cc: emacs-devel

> I would find it very helpful to be able to leave isearch-mode but keep 
> the highlite. Is this something other would find helpful too?

There is already such an option: `lazy-highlight-cleanup'.
When nil, highlighting is not removed after the search.
You can use `M-x lazy-highlight-cleanup' to manually remove it.

> It is of course a new feature, but it can possible not break anything 
> (except isearch highliting but that is easy to check). It we want this I 
> would suggest to put it on C-RET or S-RET in isearch-mode-map.

BTW, I use C-RET to exit the search without pushing the search string
into the search ring.  Very useful to not stuff the search history
with unnecessary search strings.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: Leaving isearch-mode and keeping the highlite
  2005-08-11  0:27 ` Juri Linkov
@ 2005-08-11  0:58   ` Lennart Borgman
  2005-08-11  1:05     ` Juri Linkov
  0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2005-08-11  0:58 UTC (permalink / raw)
  Cc: emacs-devel

Juri Linkov wrote:

>>I would find it very helpful to be able to leave isearch-mode but keep 
>>the highlite. Is this something other would find helpful too?
>>    
>>
>
>There is already such an option: `lazy-highlight-cleanup'.
>When nil, highlighting is not removed after the search.
>You can use `M-x lazy-highlight-cleanup' to manually remove it.
>  
>
Thanks, but that was not what I suggested. I suggested a key binding to 
leave the highlight after search. But maybe you just wanted to tell that 
it is possible to do this?

>BTW, I use C-RET to exit the search without pushing the search string
>into the search ring.  Very useful to not stuff the search history
>with unnecessary search strings.
>  
>
Yes, it seems useful to. It is kind of the same idea. I suppose you 
would not like this to be an option.

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

* Re: Leaving isearch-mode and keeping the highlite
  2005-08-11  0:58   ` Lennart Borgman
@ 2005-08-11  1:05     ` Juri Linkov
  0 siblings, 0 replies; 10+ messages in thread
From: Juri Linkov @ 2005-08-11  1:05 UTC (permalink / raw)
  Cc: emacs-devel

> Thanks, but that was not what I suggested. I suggested a key binding
> to leave the highlight after search. But maybe you just wanted to
> tell that it is possible to do this?
>
>>BTW, I use C-RET to exit the search without pushing the search string
>>into the search ring.  Very useful to not stuff the search history
>>with unnecessary search strings.
>>  
> Yes, it seems useful to. It is kind of the same idea.  I suppose you
> would not like this to be an option.

Yes, a permanent option is not suitable, because whether to use it
depends on the concrete situation.  Leaving the highlighting after the
search you suggested is the same thing.

I want to mention also that I use C-RET to leave point at the beginning
of the found string instead of the end.  There are possible other useful
things to do.

So the question is what is a good user interface for performing
different actions on exit?  Maybe to use a prefix argument, e.g.:

`M-1 RET' - don't remove highlighting
`M-2 RET' - don't push the search string into the search ring
`M-3 RET' - leave point at the beginning of the found string

And how to combine them?  Maybe as digits of the decimal number:

`M-123 RET'

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* RE: Leaving isearch-mode and keeping the highlite
  2005-08-10 23:42   ` Lennart Borgman
@ 2005-08-11  2:20     ` Drew Adams
  2005-08-11  2:47       ` Lennart Borgman
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2005-08-11  2:20 UTC (permalink / raw)


    >Turning it on by a particular exit key sequence is not the
    >best way. I would
    >rather have that be a user option (like case-fold-search), and
    >be able to
    >toggle the option while in isearch (like we can toggle
    >case-fold-search).

    Too cumbersome to me. Sometimes I want to leave the highlite there,
    sometimes not.

I was speaking here about turning highlighting on, not removing existing
highlighting. You seem to be talking about the latter here.

>From Juri's message, there is an option already, and a command to remove the
highlighting. Letting the next search remove the previous highlighting seems
better, to me than using a separate command.

Wrt toggling the highlight persistence, it would be handy to have an
isearch-mode-map binding that toggles option `lazy-highlight-cleanup'.

Having different search-exit key sequences to either leave the highlighting
or remove it, as you suggest, sounds a bit more cumbersome to me. It would
be easier to just toggle the persistence on or off while searching.

You aren't going to want to think about the persistence each time you exit
isearch - just turn it on when you want and off when you want. I see this
much like case-fold-search, except that the effect of the toggle only takes
place after you exit isearch.

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

* Re: Leaving isearch-mode and keeping the highlite
  2005-08-11  2:20     ` Drew Adams
@ 2005-08-11  2:47       ` Lennart Borgman
  0 siblings, 0 replies; 10+ messages in thread
From: Lennart Borgman @ 2005-08-11  2:47 UTC (permalink / raw)
  Cc: Emacs Devel

Drew Adams wrote:

>    >Turning it on by a particular exit key sequence is not the
>    >best way. I would
>    >rather have that be a user option (like case-fold-search), and
>    >be able to
>    >toggle the option while in isearch (like we can toggle
>    >case-fold-search).
>
>    Too cumbersome to me. Sometimes I want to leave the highlite there,
>    sometimes not.
>
>I was speaking here about turning highlighting on, not removing existing
>highlighting. You seem to be talking about the latter here.
>
>>From Juri's message, there is an option already, and a command to remove the
>highlighting. Letting the next search remove the previous highlighting seems
>better, to me than using a separate command.
>
>Wrt toggling the highlight persistence, it would be handy to have an
>isearch-mode-map binding that toggles option `lazy-highlight-cleanup'.
>
>Having different search-exit key sequences to either leave the highlighting
>or remove it, as you suggest, sounds a bit more cumbersome to me. It would
>be easier to just toggle the persistence on or off while searching.
>
>You aren't going to want to think about the persistence each time you exit
>isearch - just turn it on when you want and off when you want. I see this
>much like case-fold-search, except that the effect of the toggle only takes
>place after you exit isearch.
>
Since the option isearch-lazy-highlight-cleanup exists I extend my 
suggestion a bit to let C-RET (or S-RET) mean "toggle 
isearch-lazy-highlight-cleanup for me temporary when I exit search".

That way there is less to keep in your head when you exit isearch. You 
do not have to remember if you already have toggled the option because 
it is always in its usual state. You would have to do that if you 
toggled the option during the search and that would distract your brain 
I guess which is working with how to search at that moment.

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

* Re: Leaving isearch-mode and keeping the highlite
  2005-08-10 23:03 Leaving isearch-mode and keeping the highlite Lennart Borgman
  2005-08-10 23:20 ` Drew Adams
  2005-08-11  0:27 ` Juri Linkov
@ 2005-08-11 20:40 ` Richard M. Stallman
  2005-08-12  7:41 ` Emilio Lopes
  3 siblings, 0 replies; 10+ messages in thread
From: Richard M. Stallman @ 2005-08-11 20:40 UTC (permalink / raw)
  Cc: emacs-devel

    It is of course a new feature, but it can possible not break anything 
    (except isearch highliting but that is easy to check). It we want this I 
    would suggest to put it on C-RET or S-RET in isearch-mode-map. The main 
    question is perhaps if we want it.

Let's please focus on preparing for the release, rather than on
new feature ideas.

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

* Re: Leaving isearch-mode and keeping the highlite
  2005-08-10 23:03 Leaving isearch-mode and keeping the highlite Lennart Borgman
                   ` (2 preceding siblings ...)
  2005-08-11 20:40 ` Richard M. Stallman
@ 2005-08-12  7:41 ` Emilio Lopes
  3 siblings, 0 replies; 10+ messages in thread
From: Emilio Lopes @ 2005-08-12  7:41 UTC (permalink / raw)


Lennart Borgman <lennart.borgman.073 <at> student.lu.se> writes:

> I would find it very helpful to be able to leave isearch-mode but keep 
> the highlite. Is this something other would find helpful too?

Have you tried "M-x highlight-regexp"?  You could even write a wrapper to
fetch the last search string automatically.

Perhaps you want something like

   http://www.emacswiki.org/cgi-bin/wiki/InteractiveSearch#CallOccurFromIsearch

I think these are far cleaner UIs than leaving isearch matches highlighted.

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

end of thread, other threads:[~2005-08-12  7:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-10 23:03 Leaving isearch-mode and keeping the highlite Lennart Borgman
2005-08-10 23:20 ` Drew Adams
2005-08-10 23:42   ` Lennart Borgman
2005-08-11  2:20     ` Drew Adams
2005-08-11  2:47       ` Lennart Borgman
2005-08-11  0:27 ` Juri Linkov
2005-08-11  0:58   ` Lennart Borgman
2005-08-11  1:05     ` Juri Linkov
2005-08-11 20:40 ` Richard M. Stallman
2005-08-12  7:41 ` Emilio Lopes

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