>> And now I'm not sure if this should be implemented at all, >> because displaying the number of all matches helped me >> many times. > > Yeah, what I actually meant was that both the total number and the number of > invisible matches is shown. Something like (using a suffix): > > I-search: [3/15] (10 visible) > > It could also say "[3/15] (5 invisible)" for all I care. Just that the > information is there. Good idea. Something like query-replace says when skipping invisible matches: Replaced 3 occurrences (skipped 10 invisible) Here is a complete implementation. But still there are small details that are not quite nice: 1. The format for invisible matches is hard-coded to " (invisible %s)", and can't be added to lazy-count-prefix-format/lazy-count-suffix-format because it's not used when there are no invisible matches. 2. Are these matches really "invisible"? There are other types of matches that are invisible as well, but can be opened. Is there a better word for matches that are invisible but can't be opened? Maybe "unreachable" or "intangible"?