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, 03 Apr 2022 20:06:37 +0300 Organization: LINKOV.NET Message-ID: <861qyerssq.fsf@mail.linkov.net> References: <87sftyweb2.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> <86fsnc4fvm.fsf@mail.linkov.net> <878rsz6um2.fsf@gmail.com> <86ils2mmbe.fsf@mail.linkov.net> <87v8w2qsee.fsf@gmail.com> <86y20vu9c6.fsf@mail.linkov.net> <875ynt41g9.fsf@gmail.com> <86pmm1azkd.fsf@mail.linkov.net> <87a6d43c6n.fsf@gmail.com> <86r16fz6bw.fsf@mail.linkov.net> <87o81i5zzn.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="13760"; 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 Sun Apr 03 19:20:12 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 1nb3tc-0003Q6-Eu for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Apr 2022 19:20:12 +0200 Original-Received: from localhost ([::1]:58848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nb3ta-0007tM-OD for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Apr 2022 13:20:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nb3tS-0007sy-GF for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2022 13:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nb3tS-00047C-7P for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2022 13:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nb3tS-0000IW-1U for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2022 13:20: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, 03 Apr 2022 17:20: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.16490063561087 (code B ref 53126); Sun, 03 Apr 2022 17:20:01 +0000 Original-Received: (at 53126) by debbugs.gnu.org; 3 Apr 2022 17:19:16 +0000 Original-Received: from localhost ([127.0.0.1]:49432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nb3si-0000HT-4Q for submit@debbugs.gnu.org; Sun, 03 Apr 2022 13:19:16 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:38289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nb3sg-0000HE-4z for 53126@debbugs.gnu.org; Sun, 03 Apr 2022 13:19:15 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 13164240002; Sun, 3 Apr 2022 17:19:06 +0000 (UTC) In-Reply-To: <87o81i5zzn.fsf@gmail.com> (Augusto Stoffel's message of "Sun, 03 Apr 2022 10:32:12 +0200") 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:229376 Archived-At: > I've attached a sketch of a macro to help activating the minibuffer lazy > highlight. It doesn't make query-replace-read-args exactly short, I guess it will be much shorter for other less complex uses like occur? So the complexity of this feature activation will be hidden inside the macro. > Note that I haven't tested this code at all. It's for impressionistic > purposes only. This code doesn't look bad when other uses will have just one line with with-minibuffer-lazy-highlight. But then the macro with-minibuffer-lazy-highlight needs to set some reasonable default values to isearch variables, such as setting isearch-forward to t, etc. > but if you like this, I can prepare the patch. Currently it fails with Eager macro-expansion failure: (error "Malformed argument list ends with: ... so it seems the macro complexity makes it too fragile. OTOH, spreading this complexity in every feature use doesn't look better. > The anzu thing is only really meaningful if you are doing some complex > replacements with \, and whatnot. But in that case, I guess it could > help a lot? I can see how it could help during replacements, but not during entering the replacement string.