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: Sun, 20 Mar 2022 20:51:09 +0200 Organization: LINKOV.NET Message-ID: <86fsnc4fvm.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> <861qz0475w.fsf@mail.linkov.net> <87sfrd2cbb.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="39977"; 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, Dmitry Gutov To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 20 19:54:11 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 1nW0gt-000AHF-RH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 19:54:11 +0100 Original-Received: from localhost ([::1]:46136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nW0gr-0006yb-RY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 14:54:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nW0gk-0006vY-Oe for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 14:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nW0gk-0004d4-Fx for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 14:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nW0gk-0001tw-71 for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 14:54:02 -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, 20 Mar 2022 18:54: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.16478024077269 (code B ref 53126); Sun, 20 Mar 2022 18:54:02 +0000 Original-Received: (at 53126) by debbugs.gnu.org; 20 Mar 2022 18:53:27 +0000 Original-Received: from localhost ([127.0.0.1]:35134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nW0gA-0001tA-NX for submit@debbugs.gnu.org; Sun, 20 Mar 2022 14:53:26 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:46243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nW0g8-0001sv-Oi for 53126@debbugs.gnu.org; Sun, 20 Mar 2022 14:53:25 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 620BE240004; Sun, 20 Mar 2022 18:53:15 +0000 (UTC) In-Reply-To: <87sfrd2cbb.fsf@gmail.com> (Augusto Stoffel's message of "Sun, 20 Mar 2022 10:38:48 +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:228634 Archived-At: >> 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, ... > > I'm experimenting with adding lazy-highlight directly into > `read-regexp', controlled by a new option `read-regexp-lazy-highlight', > which, preferably, would be t by default. Thus, in particular, all the > above commands would get lazy-highlight by default. > > At first this felt somewhat intrusive, and third-party code might > require adaptation. The advantage is that the said adaptation is very > easy. Namely, a package author would have three options: > > - Do nothing. Then read-regexp will have lazy highlighting as dictated > by read-regexp-lazy-highlight. > - If lazy-highlighting makes no sense at all in a given context, then > let-bind read-regexp-lazy-highlight to nil. > - If customizability is desired, define `package-X-lazy-highlight' and > let-bind read-regexp-lazy-highlighting to that. > > What do you think? (This is probably also the approach with the minimal > number of additional code/changed lines, which seems to be desirable.) Sorry, I have no idea who and how might want to use lazy-highlighting in the minibuffer. I'd just provide a hook that any user can add to the minibuffer-setup-hook, or any package author can add to minibuffer-with-setup-hook. But in any case we need more opinions.