From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Live System User Newsgroups: gmane.emacs.bugs Subject: bug#29321: Isearch hit count Date: Fri, 02 Nov 2018 08:51:34 -0400 Message-ID: <87ftwjod61.fsf@aol.com> References: <87o9bfqfc3.fsf@mail.linkov.net> <988284b2-58af-428d-9c6f-da56db0c6565@default> <874ld5elxb.fsf@mail.linkov.net> <3e52e081-ad81-41a6-a0d6-295790db82d4@default> <877ei049f6.fsf@mail.linkov.net> <2231d642-cb4a-4114-9896-be995e4c6460@default> <87r2g7kp8u.fsf@mail.linkov.net> <8629624d-6118-4b6b-b626-77801112326a@default> <76796f6d-4d0d-47d6-bea7-0944cf53cb18@default> <877ehx7qj9.fsf@mail.linkov.net> <2dca8e1b-2949-4b07-8467-27f873dd0f3d@default> <87a7msl9oz.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541163015 2542 195.159.176.226 (2 Nov 2018 12:50:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2018 12:50:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 29321@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 02 13:50:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIYtt-0000Xn-Em for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Nov 2018 13:50:09 +0100 Original-Received: from localhost ([::1]:51379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIYvz-0005OF-Hy for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Nov 2018 08:52:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIYvn-0005Nr-KV for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 08:52:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIYvi-0005HM-Lf for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 08:52:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55062) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIYvi-0005HG-Fq for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 08:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gIYvi-00086T-DR for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 08:52:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Live System User Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Nov 2018 12:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29321 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154116311831140 (code B ref -1); Fri, 02 Nov 2018 12:52:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Nov 2018 12:51:58 +0000 Original-Received: from localhost ([127.0.0.1]:59320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIYve-00086C-DI for submit@debbugs.gnu.org; Fri, 02 Nov 2018 08:51:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIYvc-00085z-ST for submit@debbugs.gnu.org; Fri, 02 Nov 2018 08:51:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIYvW-0005EF-Pg for submit@debbugs.gnu.org; Fri, 02 Nov 2018 08:51:51 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gIYvW-0005E6-Ly for submit@debbugs.gnu.org; Fri, 02 Nov 2018 08:51:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIYvV-0005NI-Pl for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 08:51:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIYvQ-0005CO-Oh for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 08:51:49 -0400 Original-Received: from [195.159.176.226] (port=40185 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIYvQ-0005BR-Ds for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 08:51:44 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gIYtH-0008Jc-BM for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 13:49:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 61 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:pavXbTonydVTDzeXZ2/rwjZnqDw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151951 Archived-At: Juri Linkov writes: Hi, >>> > 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. Thank you for adding this! Now that you have the count, would it be posible to add a command to specify which occurane of a match to go to and/or highlight? Lets say there are 100 matches. I search through them and wind up at 42/100. I stop seaching and do something else. I decide I want to go back to my previous search. It would be very handy to have a command to do "goto match 42" or "goto match 67" or "goto match last-match" .e.g. go directly to 100/100 (since 100 is the last found numbered match reported by isearch) and I would then see the 100th match highlighted and the indicator displaying "100/100". Let me know if this should be a separate enhancement request. Thanks.