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.bugs Subject: bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc. Date: Sat, 08 Jan 2022 20:59:45 +0200 Organization: LINKOV.NET Message-ID: <861r1iyrvw.fsf@mail.linkov.net> References: <87sftyweb2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23045"; 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: 53126@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 08 20:11:28 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1n6H7d-0005pm-LN for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jan 2022 20:11:25 +0100 Original-Received: from localhost ([::1]:35710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6H7c-00051Z-5i for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jan 2022 14:11:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6H7I-0004yo-DN for bug-gnu-emacs@gnu.org; Sat, 08 Jan 2022 14:11:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6H7G-00047H-Bq for bug-gnu-emacs@gnu.org; Sat, 08 Jan 2022 14:11:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n6H7G-0002je-7X for bug-gnu-emacs@gnu.org; Sat, 08 Jan 2022 14:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jan 2022 19:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53126 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 53126-submit@debbugs.gnu.org id=B53126.164166903210466 (code B ref 53126); Sat, 08 Jan 2022 19:11:02 +0000 Original-Received: (at 53126) by debbugs.gnu.org; 8 Jan 2022 19:10:32 +0000 Original-Received: from localhost ([127.0.0.1]:48722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n6H6m-0002ik-Ew for submit@debbugs.gnu.org; Sat, 08 Jan 2022 14:10:32 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:41207) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n6H6k-0002iU-CB for 53126@debbugs.gnu.org; Sat, 08 Jan 2022 14:10:31 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 3E97D1C0002; Sat, 8 Jan 2022 19:10:22 +0000 (UTC) In-Reply-To: <87sftyweb2.fsf@gmail.com> (Augusto Stoffel's message of "Sat, 08 Jan 2022 14:24:33 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223822 Archived-At: > The anzu package was mentioned recently in the mailing list. Emacs now > includes the lazy-count feature, which is the main purpose of anzu, but > it's still missing one nice feature from that package, namely the > highlighting and count of matches as one types a regexp or string to > replace in `query-replace{-regexp}'. See the below patch for a > (probably not yet mature) stab at this. Strange, I expected that the lazy-count feature applied to query-replace should do a different thing - when querying about replacing the current match, it should show the number of current match and the number of total matches. The latter number should be updated after every replacement. But your patches are intended for a different feature - highlighting of matches in the buffer while entering an input string in the minibuffer. I wonder how many users need this feature, when it's easy to construct a query-replace string using highlighting/counting in isearch-mode, then type M-% (isearch-query-replace) that invokes query-replace with the query-replace string. Perhaps better to ask on emacs-devel if anyone needs this feature.