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: Drew Adams
Subject: bug#29321: Isearch hit count
Date: Thu, 1 Nov 2018 16:46:10 -0700 (PDT)

> >> > 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.

Thanks for checking and for the new version.  I'll give
it a try when I can.

But no, I wasn't testing in *info*.  I think I was testing
just in isearch.el (the new one).  I don't recall for sure.
But what made you think I was testing in *info*?  And why
does the buffer matter?

Being able to specify the format is good.  (Haven't looked
at the code yet, but I would have expected a variable (even
an option perhaps) instead of a function, a priori.)

Thx - Drew





reply via email to

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