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: Thu, 17 Mar 2022 22:40:19 +0200 Organization: LINKOV.NET Message-ID: <861qz0475w.fsf@mail.linkov.net> References: <87sftyweb2.fsf@gmail.com> <861r1iyrvw.fsf@mail.linkov.net> <87zgo6owaf.fsf@gmail.com> <86k0f9xnrn.fsf@mail.linkov.net> <87tuedp6pl.fsf@gmail.com> <861r1g7n3b.fsf@mail.linkov.net> <87o84jcx5x.fsf@gmail.com> <8635lvif0r.fsf@mail.linkov.net> <87mtidip1w.fsf@gmail.com> <86zglrl4gq.fsf@mail.linkov.net> <87ee32yk7v.fsf@gmail.com> <861qz1zqfb.fsf@mail.linkov.net> <875yod1wyb.fsf@gmail.com> <86mtho5y56.fsf@mail.linkov.net> <87sfrgz979.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="23762"; 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 Thu Mar 17 22:16:16 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 1nUxTj-00062h-GI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Mar 2022 22:16:15 +0100 Original-Received: from localhost ([::1]:55802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nUxTi-0001ug-BD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Mar 2022 17:16:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUxTW-0001sB-Bg for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2022 17:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nUxTW-0007AH-3I for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2022 17:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nUxTV-0005yy-VX for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2022 17:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Mar 2022 21:16:01 +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.164755173522939 (code B ref 53126); Thu, 17 Mar 2022 21:16:01 +0000 Original-Received: (at 53126) by debbugs.gnu.org; 17 Mar 2022 21:15:35 +0000 Original-Received: from localhost ([127.0.0.1]:55365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUxT4-0005xv-QJ for submit@debbugs.gnu.org; Thu, 17 Mar 2022 17:15:35 -0400 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:42997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUxT3-0005xf-6X for 53126@debbugs.gnu.org; Thu, 17 Mar 2022 17:15:33 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id A0F51200008; Thu, 17 Mar 2022 21:15:25 +0000 (UTC) In-Reply-To: <87sfrgz979.fsf@gmail.com> (Augusto Stoffel's message of "Thu, 17 Mar 2022 20:10:34 +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:228513 Archived-At: >>> My idea is: >>> >>> - The users of the feature are Elisp programmers / package authors. >>> - I don't think end users can meaningfully do anything directly with >>> this new minibuffer hook. >>> - If package X wants to take advantage of the feature, then it will >>> either add minibuffer-lazy-highlight-setup to the >>> minibuffer-setup-hook unconditionally, or it will define an >>> X-lazy-highlight customization option to control this. >>> >>> So I think the conclusion is that the current approach in my patch is an >>> good way to proceed here? >> >> So do you think end users should not be able to decide where they want >> to use this feature? For example, if one user will want it for 'occur', >> but another user doesn't want it in the 'occur' regexp-reading minibuffer, >> they should have no choice? > > Of course there should an option, maybe occur-lazy-highlight. This is > why isearch.el itself should _not_ contain a customization option called > `minibuffer-lazy-highlight': each use (or group of uses) of this > functionality should define their own customization option. This means dozens of new options for every possible command that uses the minibuffer: occur-lazy-highlight, keep-lines-lazy-highlight, flush-lines-lazy-highlight, kill-matching-lines-lazy-highlight, copy-matching-lines-lazy-highlight, how-many-lazy-highlight, ...