>> So, what is decided. Is it getting patched for emacs-27? > > Yes, it's fine with me. Thanks. Now pushed to emacs-27. But there is still one corner case I'm worried about: isearch-lazy-count still counts matches that can't be opened and can't be visited, such as hidden links in org-mode. To not count them we need to bind 'search-invisible' to 'open' in isearch-lazy-highlight-search, but the problem is that isearch-filter-predicate and isearch-range-invisible will temporarily open them, whereas we need just to check whether they can be opened. So in the following patch I added a new variable isearch-check-overlays that could instruct isearch-range-invisible to not open overlays when it's non-nil that means we need only to check them, not open: