[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29321: Isearch hit count

From: Juri Linkov
Subject: bug#29321: Isearch hit count
Date: Thu, 15 Nov 2018 23:16:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> But this implementation causes flicker because it updates
>> isearch highlighting on every search hit while traversing
>> all found matches COUNT times until it reaches COUNT-th match.
>> Attached is a better approach that adds the COUNT arg to
>> isearch functions down to the lowest-level isearch function,
>> thus making it compatible with the COUNT arg of re-search-forward:
>   Unfortunately, this patch (below) had errrs for me:
>    ...and in the echo area I see:
>              0/0 I-search: -c [(void-variable +)]

It seems this `+' comes from the diff indicator from the
beginning of the diff line from failed patching.

So I attached a whole new file isearch-repeat.3.el
for your convenience.

But please note that it contains a new implementation
because I found problems in the previous implementation:
when COUNT is added to low-level isearch functions then
they don't skip filtered-out matches.

So a better place is in isearch-search after
`funcall isearch-filter-predicate'.  But the problem
is that when (= (match-beginning 0) (match-end 0))
then it doesn't move point one character forward like
isearch-repeat does.  So the right place to use COUNT is in

Please try a new implementation:

Attachment: isearch-repeat.3.el
Description: application/emacs-lisp

reply via email to

[Prev in Thread] Current Thread [Next in Thread]