Received: (at 72147) by debbugs.gnu.org; 23 Jul 2024 17:52:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 23 13:52:33 2024 Received: from localhost ([127.0.0.1]:60677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sWJgf-0005XA-AU for submit <at> debbugs.gnu.org; Tue, 23 Jul 2024 13:52:33 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:57081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1sWJgd-0005Ww-7q for 72147 <at> debbugs.gnu.org; Tue, 23 Jul 2024 13:52:32 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 5F82E60003; Tue, 23 Jul 2024 17:52:19 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Michael Heerdegen <michael_heerdegen@HIDDEN> Subject: Re: bug#72147: 30.0.60; 30.0.60; Misleading regexp highlighting in 'Q' dired command In-Reply-To: <87ed7k4fwd.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 23 Jul 2024 11:27:30 +0200") Organization: LINKOV.NET References: <87r0bsn0ok.fsf@HIDDEN> <86le1xkh8w.fsf@HIDDEN> <87r0bpu6tn.fsf@HIDDEN> <86ttggr4u5.fsf@HIDDEN> <87ed7k4fwd.fsf@HIDDEN> Date: Tue, 23 Jul 2024 20:40:47 +0300 Message-ID: <868qxsyq0o.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72147 Cc: 72147 <at> debbugs.gnu.org, Visuwesh <visuweshm@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> Thanks for the patch, now pushed to master. > > Wouldn't it be better to add a new optional argument NO-HIGHLIGHT to > `query-replace-read-args', for stylistic reasons? It's not clear how such arg should be combined with `query-replace-lazy-highlight' in `query-replace-read-args': (defun query-replace-read-args (prompt regexp-flag &optional noerror no-highlight) ... (from (minibuffer-with-setup-hook (minibuffer-lazy-highlight-setup :highlight query-replace-lazy-highlight with `and'? With `or'? With `xor'? `(and query-replace-lazy-highlight (not no-highlight))'?
bug-gnu-emacs@HIDDEN
:bug#72147
; Package emacs
.
Full text available.Received: (at 72147) by debbugs.gnu.org; 23 Jul 2024 09:27:03 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 23 05:27:03 2024 Received: from localhost ([127.0.0.1]:59248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sWBnS-0006Qc-Si for submit <at> debbugs.gnu.org; Tue, 23 Jul 2024 05:27:03 -0400 Received: from mout.web.de ([217.72.192.78]:50519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <michael_heerdegen@HIDDEN>) id 1sWBnO-0006Pw-Bs for 72147 <at> debbugs.gnu.org; Tue, 23 Jul 2024 05:27:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1721726803; x=1722331603; i=michael_heerdegen@HIDDEN; bh=r1Al8F/4+qDEOS6llrbFNVDSmwpCLwbfpc/65qDeU0Q=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=JA07JeEY/NE4xWaqb+Fkf5XCPf5VZUqsRejOEAoMsz2NpQHvHAkDD5rPBH/2jI2G K/m95GVBRMh5t3hAcxq8sw0dNTjD3U/ZUJVpbJvK3QtSaS4jjTUtrgX9aBoHKCmxQ Y5P1gddeJzd3glBYgMaqhcFyB68alLITh4FE2PNi1IRqWTPZkoMIepE7ueSL7VWuF RIT7g9ynQ9LRb8k1CdG7g14IUNdMC8mWDMApDE3tonvs2fGfrnoDeC0zuG6kE9wit 9c/XDfuKHM/OV5V0ksByBFp8fNkZ/poqdW2XdNJVNi7bhrUX0pmW0buSc9mPqPQR4 9d8LB4fvjNxXpMxIAQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([84.59.210.113]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MumNN-1sDpaq2NMZ-00rZTG; Tue, 23 Jul 2024 11:26:43 +0200 From: Michael Heerdegen <michael_heerdegen@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#72147: 30.0.60; 30.0.60; Misleading regexp highlighting in 'Q' dired command In-Reply-To: <86ttggr4u5.fsf@HIDDEN> (Juri Linkov's message of "Tue, 23 Jul 2024 09:37:54 +0300") References: <87r0bsn0ok.fsf@HIDDEN> <86le1xkh8w.fsf@HIDDEN> <87r0bpu6tn.fsf@HIDDEN> <86ttggr4u5.fsf@HIDDEN> Date: Tue, 23 Jul 2024 11:27:30 +0200 Message-ID: <87ed7k4fwd.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:qNAvMc9pln6wYXzK7X6dDLalD8pVoRZVZowXlB1X4FEzzqA7zBb ejDZl3Tp+KM2Gx4HIZ7YAGurkSZ0rjNLupcGbvKS1M+dgccvnk43XBVmKF/roorcUs0egXD HWepOu0mAdKESF7GNQTqvEqUZ7vkUE+N2EISfMxPF4HUPqAdzs5pW0akikdsq4/7rrLcDgs GP4M9EnGinQAztG652nOQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:HMvb3S2CpaY=;XK+/U02QU1lh2uxUFHKaPo4jas2 vGnQndzqe5AEpK39quxzVWMFruemhufs5nGqlt2CXJx/KuaZT+cRO4ZosUHCxrYwLm4ni3fYs d4uQ4m/gqskNgFkkEH1Ss81pULBoXRLrKlRrDw1Ptw9jryLxEew9OX7X8+/392W7ajGley/NJ Tf6PX8vYypUROFGrP9z8VyRdRoykp6b3mjUTU19h4JdBwsVEix1hItzi/XIETflXCbFrEHuVe B1wFR6SoK8vs7qnQ6CCYJP7+ZJL4g9BkeXWLWePNB9BuK++sq8UL8y6Hp1AKeHca3PILQXr6E nnDqLmbH4MpuGDaQXxU+Y5/igLhL5+go7lwSxKF1zScuhkbvpJKIiUlDatqm2cx20XPEnaS4d JYli2iZ8YZvzUPVTFcS4wdxdaI3hWGQBYJ751YXv544zOQKP0ntlwSGYpsLwFUH/12ZlzVyCc KaJ+nq/HpGHtCFlkZ30CRLzuibpf0LriP6SfWKUnPekzzOq55z+JLM2i9S3i5NRkLczJii6ha Ld+iNz7PTmgevY5U3ULSRGbpFmMlmjQcxl0QleLPtNzWUU8bl+FF0MzXG6FjG/anWY/QHgsPk J7P7bZpQYjHEGPfyQnQULkgSeXPREdJTCsw+8K38oWVUd3xxuWRhprj/wzr2JGbJzkvdjMc7b 9D5EIA5LdIZrb3kWEF43Dr9K2+1AhEQ2iKM8Nl9CvM4m2+A/AXRhl+0/i6AgSgR+xOXZ6guzv IO6ihWap3W2WaxDRDI/X8XyCxm+piLTjRbhZBPQFGuY87iU3rzAUbcfkxmEl9w8QahHvon5Z+ W8tEv3BNJPjELzf+/hr008Aw== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72147 Cc: 72147 <at> debbugs.gnu.org, Visuwesh <visuweshm@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Juri Linkov <juri@HIDDEN> writes: > Thanks for the patch, now pushed to master. Wouldn't it be better to add a new optional argument NO-HIGHLIGHT to `query-replace-read-args', for stylistic reasons? Michael.
bug-gnu-emacs@HIDDEN
:bug#72147
; Package emacs
.
Full text available.Juri Linkov <juri@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 72147) by debbugs.gnu.org; 23 Jul 2024 06:39:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 23 02:39:52 2024 Received: from localhost ([127.0.0.1]:59021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sW9Bg-0007ZK-6J for submit <at> debbugs.gnu.org; Tue, 23 Jul 2024 02:39:52 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:59209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1sW9Bd-0007Yq-Q7; Tue, 23 Jul 2024 02:39:50 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 03E17FF806; Tue, 23 Jul 2024 06:39:37 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Visuwesh <visuweshm@HIDDEN> Subject: Re: bug#72147: 30.0.60; 30.0.60; Misleading regexp highlighting in 'Q' dired command In-Reply-To: <87r0bpu6tn.fsf@HIDDEN> (Visuwesh's message of "Fri, 19 Jul 2024 13:55:24 +0530") Organization: LINKOV.NET References: <87r0bsn0ok.fsf@HIDDEN> <86le1xkh8w.fsf@HIDDEN> <87r0bpu6tn.fsf@HIDDEN> Date: Tue, 23 Jul 2024 09:37:54 +0300 Message-ID: <86ttggr4u5.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72147 Cc: 72147 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) close 72147 31.0.50 thanks >> Shouldn't query-replace-lazy-highlight be added to all >> functions in dired that use query-replace-read-args? > > Yes, you're right. I have attached a patch that does it. Thanks for the patch, now pushed to master. > BTW, is there a reason why xref--query-replace-1 let-binds > query-replace-lazy-highlight to nil? I guess for the same reason why you let-bind it to nil in Dired, i.e. in Xref it's called in an irrelevant buffer too.
bug-gnu-emacs@HIDDEN
:bug#72147
; Package emacs
.
Full text available.Received: (at 72147) by debbugs.gnu.org; 19 Jul 2024 15:26:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 19 11:26:35 2024 Received: from localhost ([127.0.0.1]:50205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sUpVC-0001Ok-Ro for submit <at> debbugs.gnu.org; Fri, 19 Jul 2024 11:26:35 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:48595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <visuweshm@HIDDEN>) id 1sUpVA-0001OW-Nu for 72147 <at> debbugs.gnu.org; Fri, 19 Jul 2024 11:26:33 -0400 Received: by mail-qk1-f194.google.com with SMTP id af79cd13be357-79efbc9328bso100774285a.1 for <72147 <at> debbugs.gnu.org>; Fri, 19 Jul 2024 08:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721402728; x=1722007528; darn=debbugs.gnu.org; h=mime-version:user-agent:references:message-id:date:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=LoGzHlcFwuwSFLnmKbA9K56G01AAxUDF6VastEUpq1I=; b=PX0c5sAFnm/tv8Q0AA1/FFGkK9NgnlcGGJcg5vDkEuLPQWaA/wP6GxayTj2QKApzHj lxWoha0DWchn1wGV1HV0PhIhuZEzXJ6kYAcJMGFhduUOMcZgbwWa6rxm3Fp/Br/dEGo/ af8PtHNb2hIUa5vXz0V5l9dk7rTkB9cl9t/vlkJOdLQVJP2bM/lpDbXGFE0wsgXUgNbn owwjo+87THWBvsU9Rp4TSK5XrlPQHfGfRGJqFocA8hjjmQsTOpwyuedq777lKOoG1CLj qvJ+bmU5B1F72z7dVl6EHxiSExwfYiIBAJZf5IpuwzbXK1YQhbcosJD2+D4psTq5Xagb fFiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721402728; x=1722007528; h=mime-version:user-agent:references:message-id:date:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LoGzHlcFwuwSFLnmKbA9K56G01AAxUDF6VastEUpq1I=; b=V/E025c/MBy7KMK5D7Qkd8f8YUGOvv4JAvEL6EF/R4Uu/i/6hGA/H94QFaJFeiCtRl BFvlMkk+XbuGV8decaOsLvkrVxNT0J4fW1UrzyQ1Bac2NrefQjjD3yVRbgjcL4cj6p1z 8D9imhp4mI2UaRmh5JfWi+AiRwqvZ+Fg96TJp8ad5od7tzoI/fbsnwnBkBHr/y83Z0WA u+WscmQHJF8WvtavNbQ3arzmb+4QL1q4G/PLTX61zL3aTGe8si1E2RjitzjrHroDrfQo F1HfYTqX0vlLfLBcBKMi7X5zHjhEfTLO4WW8NkKl5ST/bSbE4KPDat92ocrjZ+rWAqW7 JPRw== X-Gm-Message-State: AOJu0Yz0SfD4Rce+39vkafag4D/e15GLNeyvT2Zs3kPOC2kJeT4i9IDx WzV2IES+zeQrqWj4lVTXsF911ek+p4k5ElsceFHuMiErP9zElTGHmtC9mdEk X-Google-Smtp-Source: AGHT+IEaTHYSSpmvcS8T113smW+ppAHgtyA+bCqLhFf2I0dowlWs3QMf4uFqvyk9oOZxGYtndT3JTg== X-Received: by 2002:a05:6a00:18a7:b0:70b:12:5241 with SMTP id d2e1a72fcca58-70cfc908030mr1954666b3a.13.1721377533367; Fri, 19 Jul 2024 01:25:33 -0700 (PDT) Received: from localhost ([49.204.129.171]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70cff2e908dsm736423b3a.0.2024.07.19.01.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jul 2024 01:25:31 -0700 (PDT) From: Visuwesh <visuweshm@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#72147: 30.0.60; 30.0.60; Misleading regexp highlighting in 'Q' dired command In-Reply-To: <86le1xkh8w.fsf@HIDDEN> (Juri Linkov's message of "Fri, 19 Jul 2024 09:50:23 +0300") Date: Fri, 19 Jul 2024 13:55:24 +0530 Message-ID: <87r0bpu6tn.fsf@HIDDEN> References: <87r0bsn0ok.fsf@HIDDEN> <86le1xkh8w.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72147 Cc: 72147 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=9C=E0=AF=82= =E0=AE=B2=E0=AF=88 19, 2024] Juri Linkov wrote: >> 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. Ah, I guess I didn't test properly in emacs -Q. I ended up mixing my own config and emacs -Q. My bad. > Shouldn't query-replace-lazy-highlight be added to all > functions in dired that use query-replace-read-args? Yes, you're right. I have attached a patch that does it. BTW, is there a reason why xref--query-replace-1 let-binds query-replace-lazy-highlight to nil? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Don-t-highlight-matches-in-dired-query-replace-comma.patch From b2c7a4deafd505c18a0907fb86b86763f007e85c Mon Sep 17 00:00:00 2001 From: Visuwesh <visuweshm@HIDDEN> Date: Wed, 17 Jul 2024 09:11:04 +0530 Subject: [PATCH] Don't highlight matches in dired query-replace commands * lisp/dired-aux.el (dired-do-query-replace-regexp) (dired-do-replace-regexp-as-diff) (dired-do-find-regexp-and-replace): Turn off lazy highlighting when reading the regexp from the user to avoid highlighting regexp matches in the dired buffer. (bug#72147) --- lisp/dired-aux.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index e06e36aaa75..decd9702eaf 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -3801,9 +3801,10 @@ dired-do-query-replace-regexp If you exit the query-replace loop (\\[keyboard-quit], RET or q), you can resume the query replace with the command \\[fileloop-continue]." (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))) (list (nth 0 common) (nth 1 common) (nth 2 common))) dired-mode) (dolist (file (dired-get-marked-files nil nil #'dired-nondirectory-p nil t)) @@ -3825,9 +3826,10 @@ dired-do-replace-regexp-as-diff The replacements are displayed in the buffer *replace-diff* that you can later apply as a patch after reviewing the changes." (interactive - (let ((common - (query-replace-read-args - "Replace regexp as diff in marked files" t t))) + (let* ((query-replace-lazy-highlight) + (common + (query-replace-read-args + "Replace regexp as diff in marked files" t t))) (list (nth 0 common) (nth 1 common) (nth 2 common)))) (dired-post-do-command) (multi-file-replace-regexp-as-diff @@ -3901,7 +3903,8 @@ dired-do-find-regexp-and-replace Also see `query-replace' for user options that affect how this function works." (interactive - (let ((common + (let* ((query-replace-lazy-highlight) + (common (query-replace-read-args "Query replace regexp in marked files" t t))) (list (nth 0 common) (nth 1 common))) -- 2.45.2 --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#72147
; Package emacs
.
Full text available.Received: (at 72147) by debbugs.gnu.org; 19 Jul 2024 15:03:10 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 19 11:03:10 2024 Received: from localhost ([127.0.0.1]:50183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sUp8Y-0000hJ-7V for submit <at> debbugs.gnu.org; Fri, 19 Jul 2024 11:03:10 -0400 Received: from mslow1.mail.gandi.net ([217.70.178.240]:54503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1sUp8V-0000hC-VB for 72147 <at> debbugs.gnu.org; Fri, 19 Jul 2024 11:03:08 -0400 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 <at> debbugs.gnu.org>; Fri, 19 Jul 2024 06:56:05 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id 687ADC0003; Fri, 19 Jul 2024 06:55:59 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Visuwesh <visuweshm@HIDDEN> Subject: Re: bug#72147: 30.0.60; 30.0.60; Misleading regexp highlighting in 'Q' dired command In-Reply-To: <87r0bsn0ok.fsf@HIDDEN> (Visuwesh's message of "Wed, 17 Jul 2024 09:13:07 +0530") Organization: LINKOV.NET References: <87r0bsn0ok.fsf@HIDDEN> Date: Fri, 19 Jul 2024 09:50:23 +0300 Message-ID: <86le1xkh8w.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72147 Cc: 72147 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) > 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?
bug-gnu-emacs@HIDDEN
:bug#72147
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 17 Jul 2024 03:43:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 16 23:43:42 2024 Received: from localhost ([127.0.0.1]:34807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sTvZt-0000HQ-GW for submit <at> debbugs.gnu.org; Tue, 16 Jul 2024 23:43:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:52548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <visuweshm@HIDDEN>) id 1sTvZp-0000HF-EM for submit <at> debbugs.gnu.org; Tue, 16 Jul 2024 23:43:40 -0400 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 <visuweshm@HIDDEN>) id 1sTvZm-0005ov-7j for bug-gnu-emacs@HIDDEN; Tue, 16 Jul 2024 23:43:34 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <visuweshm@HIDDEN>) id 1sTvZj-0003Ml-JO for bug-gnu-emacs@HIDDEN; Tue, 16 Jul 2024 23:43:33 -0400 Received: by mail-pl1-x643.google.com with SMTP id d9443c01a7336-1fb1c918860so3041705ad.1 for <bug-gnu-emacs@HIDDEN>; Tue, 16 Jul 2024 20:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721187809; x=1721792609; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=hQmFTt4lE2RNBYIutPI6dq4ds7nV7JBlWreVZr/v7Ls=; b=Q1dRfm40CkXBL7sZxRhRa0PPqL8FfW75DXzjq6dOJap4KUPWq3i09epKx5tAu74HFk S9/0nq7bAVdIbgTeuXISLH0NEjFMFPFnAQIafkvGMAWspn+g0UzcfnoNCHTMsSxfODpe vnH5/WQybTsjjll4ectgz3AmwBgoJjYl3VNHkcGxcLRDLnTu/I7h4XNiYVM89zY1CsqX tVia5WSTjP8w67qodvh1p7PSMFI5TkdaHCPheKMHyFfwlCiqDPbKhm1gKSEbSLlyxl2I 2G0cb+5Pebj2/GS8AUO+Np+i+acQN9I9lpzuEhJlt7So1BtKfpZWeETRFsPMOf+3tvFQ 0O8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721187809; x=1721792609; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hQmFTt4lE2RNBYIutPI6dq4ds7nV7JBlWreVZr/v7Ls=; b=jV0S/ga9KAzBFxXYWqXTAzde/RISPva5Vp2CI0VnmWGCt34bA4uExYwotyOHh/hcSu H8Sxwpbqk16/C4nL40o4f3zTD3/QH+PqDQwPnSdK8er45l3lpRu/jQiVchmmjAfhU/C+ UmbKAY6cegde3mJm2Jk9MZ9hiPcSscEyDvex3SsTpyknElBQEzadoPaPbFTUZGRixLP3 HOvQ2OPXsIQIae5wJRg/CNB6e4YpcKR622iiZUC9JyHRQ4DmA+Dp5K04RcDigXs0OqLb e/gB8P5+COesv4aSi1I5R+ZyWCmRL4f6QTKEffzhvv+/4yiWtXzUyBm3bwyy5xRX0nfk E8FA== X-Gm-Message-State: AOJu0YycCtkO5H51mpgQVJt568wL+T1gx+al/+fHZIjD94SnM54UIDnE EuSEoIOKZIntoQImNaPYtrwrj2XxfdPBFk9z5D+7jztlQdNeSAtD5rkw9bnL X-Google-Smtp-Source: AGHT+IFEsG1QcJfpBYjngYq3NUTyru0/gdMafEQjrvqrEVGxsArqF7TKC3Ka7TWE/KI4wbQfJftHkw== X-Received: by 2002:a17:903:2311:b0:1fc:4680:820d with SMTP id d9443c01a7336-1fc4c383975mr9192085ad.9.1721187809312; Tue, 16 Jul 2024 20:43:29 -0700 (PDT) Received: from localhost ([49.205.83.42]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fc0bc50b59sm66044615ad.285.2024.07.16.20.43.28 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 20:43:28 -0700 (PDT) From: Visuwesh <visuweshm@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 30.0.60; 30.0.60; Misleading regexp highlighting in 'Q' dired command X-Debbugs-Cc: Date: Wed, 17 Jul 2024 09:13:07 +0530 Message-ID: <87r0bsn0ok.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=visuweshm@HIDDEN; helo=mail-pl1-x643.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Don-t-highlight-regexp-matches-when-using-dired-Q-co.patch From 35f06221023133708f228167f88eb5350ba84dde Mon Sep 17 00:00:00 2001 From: Visuwesh <visuweshm@HIDDEN> Date: Wed, 17 Jul 2024 09:11:04 +0530 Subject: [PATCH] Don't highlight regexp matches when using dired Q command * lisp/dired-aux.el (dired-do-query-replace-regexp): Turn off lazy highlighting when reading the regexp from the user to avoid highlighting regexp matches in the dired buffer. --- lisp/dired-aux.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index e06e36aaa75..8029074d5a4 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -3801,9 +3801,10 @@ dired-do-query-replace-regexp If you exit the query-replace loop (\\[keyboard-quit], RET or q), you can resume the query replace with the command \\[fileloop-continue]." (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))) (list (nth 0 common) (nth 1 common) (nth 2 common))) dired-mode) (dolist (file (dired-get-marked-files nil nil #'dired-nondirectory-p nil t)) -- 2.45.2 --=-=-= Content-Type: text/plain In GNU Emacs 30.0.60 (build 5, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw scroll bars) of 2024-07-10 built on astatine Repository revision: 5cf8d60e0dec5606a94749d17a5d678455b7a437 Repository branch: emacs-30 Windowing system distributor 'The X.Org Foundation', version 11.0.12101011 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-sound=alsa --with-x-toolkit=lucid --without-xaw3d --without-gconf --without-libsystemd --with-cairo' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LC_MONETARY: ta_IN.UTF-8 value of $LC_NUMERIC: ta_IN.UTF-8 value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar make-network-process emacs) Memory information: ((conses 16 41209 13476) (symbols 48 5821 0) (strings 32 14271 1663) (string-bytes 1 317312) (vectors 16 9302) (vector-slots 8 110789 8365) (floats 8 23 3) (intervals 56 256 1) (buffers 984 10)) --=-=-=--
Visuwesh <visuweshm@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#72147
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.