From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#72147: 30.0.60; 30.0.60; Misleading regexp highlighting in 'Q' dired command Date: Wed, 17 Jul 2024 09:13:07 +0530 Message-ID: <87r0bsn0ok.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34394"; mail-complaints-to="usenet@ciao.gmane.io" To: 72147@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 17 05:44:20 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 1sTvaW-0008lp-7R for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Jul 2024 05:44:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTvaG-0005tl-0x; Tue, 16 Jul 2024 23:44:04 -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 1sTvaC-0005tR-6K for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 23:44:00 -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 1sTvaB-0003TH-UN for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 23:43:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sTvaE-0000IY-In for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 23:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Jul 2024 03:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72147 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17211878221084 (code B ref -1); Wed, 17 Jul 2024 03:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jul 2024 03:43:42 +0000 Original-Received: from localhost ([127.0.0.1]:34807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTvZt-0000HQ-GW for submit@debbugs.gnu.org; Tue, 16 Jul 2024 23:43:42 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTvZp-0000HF-EM for submit@debbugs.gnu.org; Tue, 16 Jul 2024 23:43:40 -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 1sTvZm-0005ov-7j for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 23:43:34 -0400 Original-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 ) id 1sTvZj-0003Ml-JO for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 23:43:33 -0400 Original-Received: by mail-pl1-x643.google.com with SMTP id d9443c01a7336-1fb1c918860so3041705ad.1 for ; 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) Original-Received: from localhost ([49.205.83.42]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fc0bc50b59sm66044615ad.285.2024.07.16.20.43.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 20:43:28 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=visuweshm@gmail.com; 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-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:288906 Archived-At: --=-=-= 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 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)) --=-=-=--