From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Make isearch show number of invisible matches Date: Mon, 27 Jun 2022 22:45:47 +0300 Organization: LINKOV.NET Message-ID: <86h745nb4k.fsf@mail.linkov.net> References: <87bkuhiyr1.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38181"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Joost Kremers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 27 21:50:24 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5uka-0009mv-3F for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Jun 2022 21:50:24 +0200 Original-Received: from localhost ([::1]:53246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5ukY-00007I-Ek for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Jun 2022 15:50:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5uiG-0007QC-AR for emacs-devel@gnu.org; Mon, 27 Jun 2022 15:48:00 -0400 Original-Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]:36071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5uiB-0007o7-Ee for emacs-devel@gnu.org; Mon, 27 Jun 2022 15:48:00 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id D035720004; Mon, 27 Jun 2022 19:47:49 +0000 (UTC) In-Reply-To: <87bkuhiyr1.fsf@fastmail.fm> (Joost Kremers's message of "Fri, 24 Jun 2022 22:19:51 +0200") Received-SPF: pass client-ip=2001:4b98:dc4:8::227; envelope-from=juri@linkov.net; helo=relay7-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291670 Archived-At: > The consult package has a command `consult-focus-lines` which is a bit like > `keep-lines`, except that it doesn't actually delete non-matching lines from the > buffer, it just hides them using overlays with an `invisible` property. > > Running `isearch` in such a buffer does the Right Thing, in that it doesn't try > to move point to invisible matches. There's a slight hiccup, though, in the fact > that the pre- or suffix shows the total number of matches in the buffer, > including the ones that are not visible, so there is no way to see how many > *visible* matches there are. > > Is it possible to add this information to the isearch pre/suffix? What would be > most useful to me, would in fact be if both the total number of matches and the > number of visible matches would be shown. > > I assume this is currently not possible, so I would like to submit this as a > feature request. Thanks for the feature request, actually it's bug#40808 that's still not closed due to problems in Org mode. And now I'm not sure if this should be implemented at all, because displaying the number of all matches helped me many times. For example, it helped greatly when searching for a text that is part of the link in Org mode, so it provided very useful information about the real number of matches even when these matches can't be visited. But when isearch show that they exists, it's possible to edit these matches using Org commands such as a link edit with `C-c C-l'.