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#72147: 30.0.60; 30.0.60; Misleading regexp highlighting in 'Q' dired command Date: Fri, 19 Jul 2024 09:50:23 +0300 Organization: LINKOV.NET Message-ID: <86le1xkh8w.fsf@mail.linkov.net> References: <87r0bsn0ok.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="30945"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 72147@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 19 17:04:40 2024 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 1sUpA0-0007uP-5N for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Jul 2024 17:04:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUp9b-0000N4-Qg; Fri, 19 Jul 2024 11:04:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUp9W-0000MC-PE for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2024 11:04:11 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUp9P-0002zL-Mt for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2024 11:04:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sUp9O-0000iu-HT for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2024 11:04: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: Fri, 19 Jul 2024 15:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72147 X-GNU-PR-Package: emacs Original-Received: via spool by 72147-submit@debbugs.gnu.org id=B72147.17214013902689 (code B ref 72147); Fri, 19 Jul 2024 15:04:02 +0000 Original-Received: (at 72147) by debbugs.gnu.org; 19 Jul 2024 15:03:10 +0000 Original-Received: from localhost ([127.0.0.1]:50183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUp8Y-0000hJ-7V for submit@debbugs.gnu.org; Fri, 19 Jul 2024 11:03:10 -0400 Original-Received: from mslow1.mail.gandi.net ([217.70.178.240]:54503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUp8V-0000hC-VB for 72147@debbugs.gnu.org; Fri, 19 Jul 2024 11:03:08 -0400 Original-Received: from relay6-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::226]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 860A9C2CCC for <72147@debbugs.gnu.org>; Fri, 19 Jul 2024 06:56:05 +0000 (UTC) Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 687ADC0003; Fri, 19 Jul 2024 06:55:59 +0000 (UTC) In-Reply-To: <87r0bsn0ok.fsf@gmail.com> (Visuwesh's message of "Wed, 17 Jul 2024 09:13:07 +0530") X-GND-Sasl: juri@linkov.net 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288983 Archived-At: > When using the Q command in dired to query-replace-regexp across marked > files in dired, the regexp typed in the first prompt highlights text in > the _dired_ buffer. > > To reproduce, > > 1. emacs -Q > 2. C-x d ~ > 3. Q - > > Notice how the dashes in the permission fields are highlighted. This is > misleading and even confusing. It would be better to turn off regexp > highlighting for this command. The attached patch does the job on my > end. Let binding the variable this way does not turn off > lazy-highlighting during the replacement. > > @@ -3801,9 +3801,10 @@ dired-do-query-replace-regexp > (interactive > - (let ((common > - (query-replace-read-args > - "Query replace regexp in marked files" t t))) > + (let* ((query-replace-lazy-highlight) > + (common > + (query-replace-read-args > + "Query replace regexp in marked files" t t))) Thanks, I tried your patch, but it has no effect since by default Q is bound to dired-do-find-regexp-and-replace. Shouldn't query-replace-lazy-highlight be added to all functions in dired that use query-replace-read-args?