From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#29321: Isearch hit count Date: Sun, 04 Nov 2018 02:04:52 +0200 Organization: LINKOV.NET Message-ID: <87h8gx907v.fsf@mail.linkov.net> 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> <87ftwjod61.fsf@aol.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541291788 14629 195.159.176.226 (4 Nov 2018 00:36:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Nov 2018 00:36:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 29321@debbugs.gnu.org To: Live System User Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 04 01:36:24 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 1gJ6Ot-0003h5-80 for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Nov 2018 01:36:23 +0100 Original-Received: from localhost ([::1]:57174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJ6Qz-00060I-KV for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Nov 2018 20:38:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJ6Qh-0005l3-Ev for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2018 20:38:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJ6QW-0003rt-1b for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2018 20:38:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57212) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJ6QV-0003kO-Bw for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2018 20:38:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJ6QV-0005m5-8W for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2018 20:38:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Nov 2018 00:38:03 +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: Original-Received: via spool by 29321-submit@debbugs.gnu.org id=B29321.154129182622067 (code B ref 29321); Sun, 04 Nov 2018 00:38:03 +0000 Original-Received: (at 29321) by debbugs.gnu.org; 4 Nov 2018 00:37:06 +0000 Original-Received: from localhost ([127.0.0.1]:33226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJ6Pa-0005jr-Ab for submit@debbugs.gnu.org; Sat, 03 Nov 2018 20:37:06 -0400 Original-Received: from golden.birch.relay.mailchannels.net ([23.83.209.73]:41101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJ6PX-0005jO-2Z for 29321@debbugs.gnu.org; Sat, 03 Nov 2018 20:37:04 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 20A5C5C3604; Sun, 4 Nov 2018 00:37:01 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a80.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CE1D95C35E5; Sun, 4 Nov 2018 00:37:00 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a80.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Sun, 04 Nov 2018 00:37:01 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Company-Harmony: 22989b9c7149a578_1541291820958_3397312733 X-MC-Loop-Signature: 1541291820958:3122851211 X-MC-Ingress-Time: 1541291820958 Original-Received: from pdx1-sub0-mail-a80.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a80.g.dreamhost.com (Postfix) with ESMTP id 9AE7F802E1; Sat, 3 Nov 2018 17:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=SxwDMFPhu7/HuZqfp8eiBZLkwHs=; b= P2fSXQj5palNyvUIyO4u+METPidVsXdCtNujVJb/4ElfCCzXbdk5PBYHCDR8pu35 xrcsz9ppc462F4ZzzVbvR5S7PeXy6cZsL08zhKGvcyAnJwWaEaxuhlfThgBCdvIf u4iL+cJbcS6aPLMRD/f+SsJMIruoJ/w8btTv/gwTMRE= Original-Received: from mail.jurta.org (m91-129-101-157.cust.tele2.ee [91.129.101.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a80.g.dreamhost.com (Postfix) with ESMTPSA id 840BE802DF; Sat, 3 Nov 2018 17:36:59 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a80 In-Reply-To: <87ftwjod61.fsf@aol.com> (Live System User's message of "Fri, 02 Nov 2018 08:51:34 -0400") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjedugddukeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtuddrudehjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutddurdduheejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepnhihtgegsghoshesrgholhdrtghomhenucevlhhushhtvghrufhiiigvpedt 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:151994 Archived-At: > 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 for the enhancement request. This is possible to do with this patch. It allows to go to the beginning of the buffer and type 'C-s C-4 C-2 C-s', and it will go to the 42th match using the previous search string: diff --git a/lisp/isearch.el b/lisp/isearch.el index 580b3ac40a..2dbb890d88 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1563,15 +1572,19 @@ isearch-repeat (isearch-push-state) (isearch-update)) -(defun isearch-repeat-forward () - "Repeat incremental search forwards." - (interactive) - (isearch-repeat 'forward)) +(defun isearch-repeat-forward (&optional arg) + "Repeat incremental search forwards. +With a prefix argument, repeat a search ARG times." + (interactive "p") + (dotimes (_ (or arg 1)) + (isearch-repeat 'forward))) -(defun isearch-repeat-backward () - "Repeat incremental search backwards." +(defun isearch-repeat-backward (&optional arg) + "Repeat incremental search backwards. +With a prefix argument, repeat a search ARG times." (interactive) - (isearch-repeat 'backward)) + (dotimes (_ (or arg 1)) + (isearch-repeat 'backward))) ;;; Toggles for `isearch-regexp-function' and `search-default-mode'.