Re: Re: [PATCH] Conkeror like hints for incremental search
From:
gideon . stupp
Subject:
Re: Re: [PATCH] Conkeror like hints for incremental search
Date:
Tue, 24 Jan 2012 10:09:45 +0000
Hi Tassilo, thanks for taking the time to the the patch!
On , Tassilo Horn <address@hidden> wrote: > Gideon Stupp address@hidden> writes: > > > > Hi Gideon, > > > > > This patch adds Conkeror like hints to incremental-search's currently > > > matched strings. > > > This way it is possible to choose one of the highlighted possibilities > > > without completing the search string (useful when using incremental > > > search for navigation). > > > > isearch is my main navigation feature, so I've just given your patch a > > try. Here's my feedback: > > > > - The characters inserted in front of matches are somewhat baffling > > (First I've thought: Why do I have all those typos?!). At least in > > X11 frames, I'd make them smaller than the usual text, maybe even > > superscript.
Agreed. Maybe the face should be customizable.
> And it would be nice if the hint chars where appended > > to matches in forward isearch but prepended in backward isearch. > > That way, the hint char would indicate the position of point when > > selecting that match. >
Interesting. I played around with various possibilities and finally decided to always put the hints at the beginning because that is what Conkeror does. Again, maybe it should be customizable.
> > > - Concerning navigation speed, I don't feel that those type hints help > > me. It might do so if the visible buffer portion contains tons of > > matches, but in my regular use, there are only ~3 matches, so > > hitting C-s or C-r repeatedly is faster for me than switching my > > finger to some other key.
As you say, the usefulness of the hints is really for those infrequent but annoying cases where there are more than a few matches. There are two typical scenarios where I find myself using them. The first one is when I need to jump to a position on the screen that is not unique. For example lets say I am editing isearch.el and I see call to function "isearch-toggle-hints" that I want to change. Since searching for "isearch" is futile, I can search for "toggle", hopefully reach the correct line and then go back a word. But it seems easier to start the search with C-s C-f, type in a few characters of the prefix of "isearch" (3 characters are usually enough) and then use the hint if necessary. The second even more annoying use case is when I am searching for a string that I believed to be unique, but turns out to have multiple hits. In this case, instead of cancelling the search and starting a new one I can just press C-f and use the hints to jump to the correct place.
> > > > - I think C-f (and all other keys normally used for navigation) is a > > bad choice, because that's what people usually use for leaving > > isearch. Maybe M-h would be ok. It has some mnemonics, and its > > usual binding of `mark-paragraph' isn't too useful in isearch. Understood. Still it would be nice to be able to start a hinted search without switching between the control key (for C-s) and the Meta key.