Chromium counts all the matches in the page, presented or hidden. For Emacs I don't think it is feasible to read the entire file. BTW isearch-lazy-highlight takes into consideration only the matches that are currently on screen.

Thanks, Gideon.

On , Juri Linkov <juri@jurta.org> wrote:
> > Nice idea. Let me try and tweak the patch to work in this way. I want to
>
> > test it and see how it feels.
>
>
>
> BTW, there is another useful search feature missing in Isearch.
>
>
>
> In Chromium, the Search prompt displays the current search position
>
> and the total number of matches.  It would be useful to implement this
>
> in Isearch.  It helps to orient oneself while searching - to see
>
> how many matches are remaining to visit with C-s, etc.
>
>
>
> This information could be displayed in the mode-line in the usual format
>
> that can be seen in some Emacs packages, e.g. "7/24".
>
>
>
> The main problem is in the performance impact to count the total
>
> number of matches.  Perhaps to not affect the responsiveness
>
> these computations should be placed in `isearch-lazy-highlight'.
>
>