bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Fri, 02 Nov 2018 00:22:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> > I tried it, but I still see the problem.  If I repeat
>> > quickly there won't be a count in the prompt, and not
>> > just at the beginning.  Or there might be one, but
>> > then when I switch direction it disappears (rightly
>> > so, as you pointed out), but if I continue repeating
>> > in that new direction the count never appears.
>> 
>> When you type too quickly, lazy-highlighting (that also counts
>> the number of matches) has no chance to run its timer function.
>> It runs with (run-with-idle-timer lazy-highlight-initial-delay ...)
>> This means that it runs only after lazy-highlight-initial-delay
>> (by default, 0.25 secs) of inactivity.
>
> Sure, but why does the count not get displayed after you
> slow down or even stop (while remaining in Isearch).
> That's my question.
>
> That it doesn't get shown as long as you just keep C-M-s
> pressed, without letting up, is understandable.  But why
> isn't the count shown when you let up?

I now see that you are testing in the *info* buffer.
Yes, I see the same - the number of matches and overlays
are not updated when going to another Info node.
I fixed this to check the previous and current values
of (point-min) and (point-max) - they are different in
different Info nodes.

Another problem when the number was not displayed is
when you start searching forward at the end of the buffer,
and there are matches above.  I fixed it to display e.g.
"0/123", meaning there are 123 matches total, but there is
no current match yet.

Also in a new version attached I added a new function
isearch-lazy-count-format that is easy to redefine
to display current/total in another format either
in the message prefix or suffix.

Attachment: isearch.count.5.el
Description: application/emacs-lisp


reply via email to

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