From unknown Sun Jun 22 11:46:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Feb 2022 19:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 53758@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164391548012076 (code B ref -1); Thu, 03 Feb 2022 19:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Feb 2022 19:11:20 +0000 Received: from localhost ([127.0.0.1]:57795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFhVn-00038i-Hb for submit@debbugs.gnu.org; Thu, 03 Feb 2022 14:11:19 -0500 Received: from lists.gnu.org ([209.51.188.17]:47582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFhVk-00038W-7G for submit@debbugs.gnu.org; Thu, 03 Feb 2022 14:11:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFhVk-0006LZ-0v for bug-gnu-emacs@gnu.org; Thu, 03 Feb 2022 14:11:16 -0500 Received: from wrqvxtdp.outbound-mail.sendgrid.net ([149.72.167.211]:37648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nFhVh-00086v-3k for bug-gnu-emacs@gnu.org; Thu, 03 Feb 2022 14:11:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:mime-version:to:content-type:content-transfer-encoding; s=s1; bh=qJRmAyJO98taaLYxVCdsA7WUm/CUOnzqYQpWJFZazzQ=; b=iIEbrpeJsCIQDL7xo5Tcyc8Usw4scpNUcV966mPOkbAgAcetQiu8CwlTnFkxh+R++sRd pVJfX/3fRaHKdtT5HOCqWWypGHxsczEEGA71/pyZEDENWK5adKjpRjVgiYvISph78EszDC 84UFNp7YUn8kBBIjnUuRUPmo9ZjHis0tdDtFP1gqGX+OsqM6T04qBXoh+Q+tHYMV2X6XjO Se5pYqrqf+UxBU4Jk9QUjUGWuiUXtSU1+suiVrtRvVqiUyiX2GAcUCqhuw0ae8mVkjfzLd TDge9imyUGGm/ClVIW+FfoTY6LfHkdLxcAYNjoaXmgQim4qqDgjGPZcitKQiq1bA== Received: by filterdrecv-656998cfdd-k9vkv with SMTP id filterdrecv-656998cfdd-k9vkv-1-61FC28CF-3 2022-02-03 19:11:11.068952948 +0000 UTC m=+11648631.854265441 Received: from earth.catern.com (unknown) by ismtpd0169p1iad2.sendgrid.net (SG) with ESMTP id 3WcbX3-iRNaPm3qUsCvMXA for ; Thu, 03 Feb 2022 19:11:10.872 +0000 (UTC) Received: by earth.catern.com (Postfix, from userid 1000) id 5A38D624EE; Thu, 3 Feb 2022 14:11:10 -0500 (EST) From: sbaugh@catern.com Date: Thu, 03 Feb 2022 19:11:11 +0000 (UTC) Message-ID: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> MIME-Version: 1.0 X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbIzGQKbi3okbC9IKA7FqDu9S0PWYX977eMdg8+E9B7LT6zwaElGT59HecD7dRp+85xpPu0aE5hYTamnwjN8tN4vj4CidjMZgwIQf/zdma0bZbJbWKHe4F/XeZX2KCTVGSkr08HrRWDoUXOA64MW8444fliI9rZ29bnyfVbml4gJHg== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=149.72.167.211; envelope-from=bounces+21787432-3678-bug-gnu-emacs=gnu.org@em8926.catern.com; helo=wrqvxtdp.outbound-mail.sendgrid.net X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 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, RCVD_IN_BL_SPAMCOP_NET=1.347, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) isearch-forward (C-s) while in a recursive edit (C-r) triggered from dired-do-find-regexp-and-replace (Q in a dired buffer) always fails to find any matches for any string, even if there are matches in the buffer. Steps to reproduce: 1. Open a dired buffer in a directory containing at least one file which contains some text (e.g. "Hello world") 2. Run dired-do-find-regexp-and-replace to replace "Hello" with "Goodbye" ("Q Hello RET Goodbye RET"); this will switch buffers to the first matching file. 3. Type C-r to enter a recursive edit (I'm guessing this runs (recursive-edit)?) 4. At the start of the buffer, run isearch-forward searching for "world" ("C-s world RET") 5. Note that the isearch fails despite "world" being in the buffer. For what it's worth, this interestingly doesn't happen with project-query-regexp-replace (which also does multi-file query-replace). In GNU Emacs 28.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) Repository revision: 525dc6e5c428185b62c72d7958cd4fe17937f126 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: NixOS 21.05 (Okapi) Configured using: 'configure --prefix=/nix/store/rkpz8vsk15zlphra3hhngf96irwci7r3-emacs-git-20220115.0 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft --with-cairo' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $EMACSLOADPATH: value of $EMACSNATIVELOADPATH: /nix/store/fs7slsl0rz28h6dq8rnhgk4ddkk8dh0w-emacs-packages-deps/share/emacs/native-lisp:/nix/store/b854vn0hskfs7d2j4pr1vp71fhf4ynvc-emacs-packages-deps/share/emacs/native-lisp::: value of $LANG: C.UTF-8 locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: tooltip-mode: t global-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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /home/sbaugh/.nix-profile/share/emacs/site-lisp/site-start hides /nix/store/b854vn0hskfs7d2j4pr1vp71fhf4ynvc-emacs-packages-deps/share/emacs/site-lisp/site-start /home/sbaugh/.nix-profile/share/emacs/site-lisp/site-start hides /nix/store/rkpz8vsk15zlphra3hhngf96irwci7r3-emacs-git-20220115.0/share/emacs/site-lisp/site-start /nix/store/b854vn0hskfs7d2j4pr1vp71fhf4ynvc-emacs-packages-deps/share/emacs/site-lisp/elpa/transient-20220112.1305/transient hides /nix/store/rkpz8vsk15zlphra3hhngf96irwci7r3-emacs-git-20220115.0/share/emacs/28.0.91/lisp/transient /nix/store/b854vn0hskfs7d2j4pr1vp71fhf4ynvc-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/rkpz8vsk15zlphra3hhngf96irwci7r3-emacs-git-20220115.0/share/emacs/28.0.91/lisp/emacs-lisp/let-alist Features: (shadow sort mail-extr eieio-opt cl-extra speedbar ezimage dframe find-func shortdoc help-fns radix-tree help-mode emacsbug message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils misearch multi-isearch bug-reference pulse color vc-mtn vc-hg vc-git diff-mode easy-mmode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher find-dired grep compile text-property-search comint ansi-color xref project ring thingatpt dired-aux cl-loaddefs cl-lib dired dired-loaddefs seq byte-opt gv bytecomp byte-compile cconv iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd 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 cl-generic 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 simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 588633 721804) (symbols 48 9814 41) (strings 32 58972 20078) (string-bytes 1 2344778) (vectors 16 49128) (vector-slots 8 391332 666289) (floats 8 169 491) (intervals 56 104017 11468) (buffers 992 22)) From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 03 14:53:34 2022 Received: (at control) by debbugs.gnu.org; 3 Feb 2022 19:53:34 +0000 Received: from localhost ([127.0.0.1]:57943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFiAe-0000Rg-5J for submit@debbugs.gnu.org; Thu, 03 Feb 2022 14:53:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFiAY-0000RO-Dt for control@debbugs.gnu.org; Thu, 03 Feb 2022 14:53:30 -0500 Received: from [2001:470:142:3::e] (port=37024 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFiAT-0002ie-3D for control@debbugs.gnu.org; Thu, 03 Feb 2022 14:53:21 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1nFiAS-0002pg-U3 for control@debbugs.gnu.org; Thu, 03 Feb 2022 14:53:20 -0500 Subject: control message for bug 53761 To: X-Mailer: mail (GNU Mailutils 3.4) Message-Id: From: Glenn Morris Date: Thu, 03 Feb 2022 14:53:20 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) merge 53758 53759 53760 53761 From unknown Sun Jun 22 11:46:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Feb 2022 18:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: sbaugh@catern.com, 53758@debbugs.gnu.org Received: via spool by 53758-submit@debbugs.gnu.org id=B53758.164417045326551 (code B ref 53758); Sun, 06 Feb 2022 18:01:02 +0000 Received: (at 53758) by debbugs.gnu.org; 6 Feb 2022 18:00:53 +0000 Received: from localhost ([127.0.0.1]:39798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGlqG-0006uB-TW for submit@debbugs.gnu.org; Sun, 06 Feb 2022 13:00:53 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:32957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGlqF-0006tv-7s for 53758@debbugs.gnu.org; Sun, 06 Feb 2022 13:00:52 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 8DF6A1BF205; Sun, 6 Feb 2022 18:00:42 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> Date: Sun, 06 Feb 2022 19:44:34 +0200 In-Reply-To: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> (sbaugh@catern.com's message of "Thu, 03 Feb 2022 19:11:11 +0000 (UTC)") Message-ID: <867da8x7v1.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > isearch-forward (C-s) while in a recursive edit (C-r) triggered from > dired-do-find-regexp-and-replace (Q in a dired buffer) always fails to > find any matches for any string, even if there are matches in the > buffer. > > Steps to reproduce: > 1. Open a dired buffer in a directory containing at least one file which > contains some text (e.g. "Hello world") > 2. Run dired-do-find-regexp-and-replace to replace "Hello" with > "Goodbye" ("Q Hello RET Goodbye RET"); this will switch buffers > to the first matching file. > 3. Type C-r to enter a recursive edit (I'm guessing this runs > (recursive-edit)?) > 4. At the start of the buffer, run isearch-forward searching for "world" > ("C-s world RET") > 5. Note that the isearch fails despite "world" being in the buffer. > > For what it's worth, this interestingly doesn't happen with > project-query-regexp-replace (which also does multi-file query-replace). This is because of these lines in xref--query-replace-1: ;; Counteract the "do the next match now" hack in ;; `perform-replace'. And still, it'll report that those ;; matches were "filtered out" at the end. (isearch-filter-predicate (lambda (beg end) (and current-beg (>= beg current-beg) (<= end current-end)))) Dmitry, could you please explain the comment above. What I don't understand is where this "the next match now" hack is in `perform-replace'? From unknown Sun Jun 22 11:46:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Feb 2022 03:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: sbaugh@catern.com, 53758@debbugs.gnu.org Received: via spool by 53758-submit@debbugs.gnu.org id=B53758.16442030284988 (code B ref 53758); Mon, 07 Feb 2022 03:04:02 +0000 Received: (at 53758) by debbugs.gnu.org; 7 Feb 2022 03:03:48 +0000 Received: from localhost ([127.0.0.1]:40567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGuJg-0001IO-77 for submit@debbugs.gnu.org; Sun, 06 Feb 2022 22:03:48 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:35616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGuJe-0001I5-Fn for 53758@debbugs.gnu.org; Sun, 06 Feb 2022 22:03:46 -0500 Received: by mail-wr1-f53.google.com with SMTP id m5so4950644wrb.2 for <53758@debbugs.gnu.org>; Sun, 06 Feb 2022 19:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=qcoY8IL7C8YiKlQ4aI1zeLtb/ydAzM+qMKmzR5HRdlg=; b=lBZLyA0aGEAbrEZYl/YijZb1OyOFRdBGZjJ5Q5NJVUTDiXB6cccg8b8N0h+Hak8rkk vyQtxo5mxgQVpGiiQ37o86F/bS2rC451Xdz04/76hmF+/rjIolwpF4A8Ge35YpACeg8L ImUdeKK4O6O92eFibXj/M7vQM1EWNfb7RGYOVx8eP6lLfplkwigJuIKavEPHz/2lIW39 aY60R9AAKfBCT5gMFWLHQ0cf+HSd5OO0g3S94SJLJNM4X9X6kL2Z/HC6ESRW0MHzS31I uvuQQrLKJiJr71Ff+c634dTOJH+Wa3avulg8cv/djF6o3c/2fu2Z+huYeAlRDlneXQrI MTxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=qcoY8IL7C8YiKlQ4aI1zeLtb/ydAzM+qMKmzR5HRdlg=; b=sNowYTprH1EyZdmiRLe9ELN2eemaSjEpYOyUQG3UVQ9K+OZpcLaFz6HiMBfRuJJ1gk e2S1nas+B54PsioPQnI4HO4GmrqoHeDT9fHF8zmfaqxXZ6Jr9G769Pkg5WMGR3M2bkOf nWtlEmRfLtr8h27H4bzVbftXxsPH4zuNaaJFKb2nO+KiF+tbznW3W7Rwra+JEUKOqKAb dGcraIrKFy9kbM3dxwK7QEu93Q1Q71qPoVkGb9sohgn0xf07iIFaGEBtw04iiNrTS4Zm QxGxmj7XsboPVyjbO+dy48pL9ifZjRE96W/p//GbOLzNUy/Zrib1FrotnscHpruCnJM6 Aovg== X-Gm-Message-State: AOAM531bA8eqnwTuu7W3GgHSgzAxsEiaQOtTJITYmYqOXN2XvYMHCynk QL+sOMK+ZYivd/NqbyPo744= X-Google-Smtp-Source: ABdhPJw93/8zjjTanmU6le2rz4gZMWF7It40kVi+bf/E/djrm8KwusTkSP+9Wd7UQoZ8UfYrYFkpkA== X-Received: by 2002:a5d:4b83:: with SMTP id b3mr3354360wrt.311.1644203020714; Sun, 06 Feb 2022 19:03:40 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id n26sm7943415wms.13.2022.02.06.19.03.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Feb 2022 19:03:39 -0800 (PST) Message-ID: <48a0ada9-c386-aca8-e3f4-ecece9defee5@yandex.ru> Date: Mon, 7 Feb 2022 05:03:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> <867da8x7v1.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <867da8x7v1.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Hi Juri, On 06.02.2022 19:44, Juri Linkov wrote: >> isearch-forward (C-s) while in a recursive edit (C-r) triggered from >> dired-do-find-regexp-and-replace (Q in a dired buffer) always fails to >> find any matches for any string, even if there are matches in the >> buffer. >> >> Steps to reproduce: >> 1. Open a dired buffer in a directory containing at least one file which >> contains some text (e.g. "Hello world") >> 2. Run dired-do-find-regexp-and-replace to replace "Hello" with >> "Goodbye" ("Q Hello RET Goodbye RET"); this will switch buffers >> to the first matching file. >> 3. Type C-r to enter a recursive edit (I'm guessing this runs >> (recursive-edit)?) >> 4. At the start of the buffer, run isearch-forward searching for "world" >> ("C-s world RET") >> 5. Note that the isearch fails despite "world" being in the buffer. >> >> For what it's worth, this interestingly doesn't happen with >> project-query-regexp-replace (which also does multi-file query-replace). > This is because of these lines in xref--query-replace-1: > > ;; Counteract the "do the next match now" hack in > ;; `perform-replace'. And still, it'll report that those > ;; matches were "filtered out" at the end. > (isearch-filter-predicate > (lambda (beg end) > (and current-beg > (>= beg current-beg) > (<= end current-end)))) > > Dmitry, could you please explain the comment above. > What I don't understand is where this > "the next match now" hack is in `perform-replace'? It's referring to the comment on lines starting with 2938 and the subsequent code which uses 'looking-at' instead of replace-re-search-function. Here's that comment in full: ;; Otherwise, if matching a regular expression, do the next ;; match now, since the replacement for this match may ;; affect whether the next match is adjacent to this one. ;; If that match is empty, don't use it. I'm not sure why the result would be different between dired-do-find-regexp-and-replace and project-query-regexp-replace, though. From unknown Sun Jun 22 11:46:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Feb 2022 19:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: sbaugh@catern.com, 53758@debbugs.gnu.org Received: via spool by 53758-submit@debbugs.gnu.org id=B53758.164426213228226 (code B ref 53758); Mon, 07 Feb 2022 19:29:01 +0000 Received: (at 53758) by debbugs.gnu.org; 7 Feb 2022 19:28:52 +0000 Received: from localhost ([127.0.0.1]:43786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH9gx-0007LC-Tf for submit@debbugs.gnu.org; Mon, 07 Feb 2022 14:28:52 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:54433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH9gt-0007Kv-PW for 53758@debbugs.gnu.org; Mon, 07 Feb 2022 14:28:50 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id EFFFD40002; Mon, 7 Feb 2022 19:28:39 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> <867da8x7v1.fsf@mail.linkov.net> <48a0ada9-c386-aca8-e3f4-ecece9defee5@yandex.ru> Date: Mon, 07 Feb 2022 21:27:07 +0200 In-Reply-To: <48a0ada9-c386-aca8-e3f4-ecece9defee5@yandex.ru> (Dmitry Gutov's message of "Mon, 7 Feb 2022 05:03:38 +0200") Message-ID: <86zgn2lbty.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain > It's referring to the comment on lines starting with 2938 and the > subsequent code which uses 'looking-at' instead of > replace-re-search-function. > > Here's that comment in full: > > ;; Otherwise, if matching a regular expression, do the next > ;; match now, since the replacement for this match may > ;; affect whether the next match is adjacent to this one. > ;; If that match is empty, don't use it. Thanks, now everything is clear. Then it can be simplified by this patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=xref--query-replace-1.patch diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 4efa652084..f334710a28 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -843,25 +843,7 @@ xref--query-replace-1 (continue t) did-it-once buf-pairs pairs current-beg current-end - ;; Counteract the "do the next match now" hack in - ;; `perform-replace'. And still, it'll report that those - ;; matches were "filtered out" at the end. - (isearch-filter-predicate - (lambda (beg end) - (and current-beg - (>= beg current-beg) - (<= end current-end)))) - (replace-re-search-function - (lambda (from &optional _bound noerror) - (let (found pair) - (while (and (not found) pairs) - (setq pair (pop pairs) - current-beg (car pair) - current-end (cdr pair)) - (goto-char current-beg) - (when (re-search-forward from current-end noerror) - (setq found t))) - found)))) + (region-extract-function (lambda (_) pairs))) (while (and continue (setq buf-pairs (funcall iter :next))) (if did-it-once ;; Reuse the same window for subsequent buffers. @@ -870,8 +852,9 @@ xref--query-replace-1 (pop-to-buffer (car buf-pairs))) (setq did-it-once t)) (setq pairs (cdr buf-pairs)) + (goto-char (point-min)) (setq continue - (perform-replace from to t t nil nil multi-query-replace-map))) + (perform-replace from to t t nil nil multi-query-replace-map nil nil nil t))) (unless did-it-once (user-error "No suitable matches here")) (when (and continue (not buf-pairs)) (message "All results processed")))) --=-=-= Content-Type: text/plain > I'm not sure why the result would be different between > dired-do-find-regexp-and-replace and project-query-regexp-replace, though. project-query-regexp-replace doesn't use xref--query-replace-1. Actually, the reported problem is not specific to xref. Performing replacements on a rectangular region doesn't allow searching outside the region on recursive edit too. So here is a general fix that covers all cases: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=isearch-filter-predicate.patch diff --git a/lisp/replace.el b/lisp/replace.el index 23e6483809..5add576d6b 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -3233,7 +3233,10 @@ perform-replace (last-command 'recenter-top-bottom)) (recenter-top-bottom))) ((eq def 'edit) - (let ((opos (point-marker))) + (let ((opos (point-marker)) + (isearch-filter-predicate isearch-filter-predicate)) + (when region-filter + (remove-function isearch-filter-predicate region-filter)) (setq real-match-data (replace-match-data nil real-match-data real-match-data)) --=-=-=-- From unknown Sun Jun 22 11:46:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Feb 2022 21:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: sbaugh@catern.com, 53758@debbugs.gnu.org Received: via spool by 53758-submit@debbugs.gnu.org id=B53758.16442683866125 (code B ref 53758); Mon, 07 Feb 2022 21:14:02 +0000 Received: (at 53758) by debbugs.gnu.org; 7 Feb 2022 21:13:06 +0000 Received: from localhost ([127.0.0.1]:43940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHBJq-0001ai-4G for submit@debbugs.gnu.org; Mon, 07 Feb 2022 16:13:06 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:42696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHBJn-0001aD-MP for 53758@debbugs.gnu.org; Mon, 07 Feb 2022 16:13:04 -0500 Received: by mail-wr1-f47.google.com with SMTP id h6so8374199wrb.9 for <53758@debbugs.gnu.org>; Mon, 07 Feb 2022 13:13:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=VDYCACLXEJwYs8ghMnu7EOztTTrSmIWnB7vj0+/WY84=; b=nPe4Hi0lXx4Nh2m7De3+CMd3kqLTv7tKGyp/4pa6GYBdqBNjhXcGa4rKhCEAM96m1B nkyr52TraRiIQP21gZoaL/SxhbilIPvMCzO6G8gK4NTAQ/dTvctHhXwyk5WnJLO03QJt l9ANyLh2wkVUmoKsXSGPuUscHZJk/GD5mcgMvRtBlAlf8ZXEgFQlWBbcmKP96KhecKlb k7MYTea2waHOL6H2O++A7qnOw6Q16NZk7tSybDRfHdPDPNY+KiSPTTrpObHFB8eiQCXt 4p3nDj6I9o8D2P17ChAj/Ex4W4yKTnCS/PLvL6mIZfaIS0r+8+LkTrByGpt9KblVkp6u ZYsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=VDYCACLXEJwYs8ghMnu7EOztTTrSmIWnB7vj0+/WY84=; b=EL50PC9qT/sh1SMBK2WEu2zgNTh8myzNQ4C6Nm4tuO9y7upIfYbddiovw0vlGVzeYI B1BEdfA49IOVbccBkVYjo6QoTGWQAwYt0WYMMI59o1Roo+YiGngu4/9zICZus619KLon FncYuwdXg6cfY3makdfdZreJk9rRO31FdOdQru3uPW9SYKdbX5N7xA4q/FK823PECmqf 6o8KTI/g7472cfDAVynvIPWeD+DhuzZcAmSm7PCakSv9hRsBGaoARMhvOBQaVVw9VW8a 4smE9pxU0K/L+eujWuEErsHRnEnhTSb2PSrwIJ6lKu7JDB+Ggyc4UtRhWjfE9zJfvbT5 k+pQ== X-Gm-Message-State: AOAM532B8um2oYhZnFjePIM7Gf+BfLDWr0KocKSI5kAHc+xJXvvYffaP yP6M6MCw3aLTml8dno5spXc= X-Google-Smtp-Source: ABdhPJxnXQOyVn7G39fZvg/M/kIOhgDJkYj9TfDhDC3LRtiJirzs2n+rI4RyqF/sfDvaEdcjK7mBww== X-Received: by 2002:a5d:548d:: with SMTP id h13mr1044784wrv.28.1644268377592; Mon, 07 Feb 2022 13:12:57 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id u14sm460429wmq.41.2022.02.07.13.12.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Feb 2022 13:12:56 -0800 (PST) Message-ID: Date: Mon, 7 Feb 2022 23:12:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> <867da8x7v1.fsf@mail.linkov.net> <48a0ada9-c386-aca8-e3f4-ecece9defee5@yandex.ru> <86zgn2lbty.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86zgn2lbty.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 07.02.2022 21:27, Juri Linkov wrote: > Thanks, now everything is clear. Then it can be simplified by this patch: Thanks! Are these changes independent? That is, will the new version of xref continue to work with Emacs 26.1? From unknown Sun Jun 22 11:46:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Feb 2022 08:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: sbaugh@catern.com, 53758@debbugs.gnu.org Received: via spool by 53758-submit@debbugs.gnu.org id=B53758.164430769332471 (code B ref 53758); Tue, 08 Feb 2022 08:09:02 +0000 Received: (at 53758) by debbugs.gnu.org; 8 Feb 2022 08:08:13 +0000 Received: from localhost ([127.0.0.1]:45113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHLXo-0008Ra-Ve for submit@debbugs.gnu.org; Tue, 08 Feb 2022 03:08:13 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:46113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHLXk-0008RJ-Qw for 53758@debbugs.gnu.org; Tue, 08 Feb 2022 03:08:12 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id A253A20004; Tue, 8 Feb 2022 08:08:01 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> <867da8x7v1.fsf@mail.linkov.net> <48a0ada9-c386-aca8-e3f4-ecece9defee5@yandex.ru> <86zgn2lbty.fsf@mail.linkov.net> Date: Tue, 08 Feb 2022 09:43:39 +0200 In-Reply-To: (Dmitry Gutov's message of "Mon, 7 Feb 2022 23:12:55 +0200") Message-ID: <86a6f1eqar.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Thanks, now everything is clear. Then it can be simplified by this patch: > > Thanks! > > Are these changes independent? That is, will the new version of xref > continue to work with Emacs 26.1? It should continue to work. Could you suggest how this independent change in xref could be tested? I see that dired-do-find-regexp-and-replace replaces all matches, but xref--query-replace-1 tries to skip some matches. What test could emulate the case where some matches should be skipped? From unknown Sun Jun 22 11:46:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Feb 2022 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: sbaugh@catern.com, 53758@debbugs.gnu.org Received: via spool by 53758-submit@debbugs.gnu.org id=B53758.16443367327830 (code B ref 53758); Tue, 08 Feb 2022 16:13:02 +0000 Received: (at 53758) by debbugs.gnu.org; 8 Feb 2022 16:12:12 +0000 Received: from localhost ([127.0.0.1]:48414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHT6C-00022D-Ce for submit@debbugs.gnu.org; Tue, 08 Feb 2022 11:12:12 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:40716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHT6A-000220-RR for 53758@debbugs.gnu.org; Tue, 08 Feb 2022 11:12:11 -0500 Received: by mail-wr1-f53.google.com with SMTP id s18so31686241wrv.7 for <53758@debbugs.gnu.org>; Tue, 08 Feb 2022 08:12:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=sNYlNJ75XoPPxaB5G2TMT4NGFMN2MQxFXvicqL7gevA=; b=SoXrGwsW+0/Y2BHeKRyMlAl5/qsVfZI/u4iK14kb7Y/N9dzLykAffbIV760YaNUeU1 7//qiD8c2OidVFrhH/sKT5LEVbFv5aQEV7J+CShalPJIdZcNf0REQC9aU4JcCaIalShA 8uI6F8eX0z5/mEvPMv/R8pvUVvpzEOO/DO4Ix/+ci3GooK4SCVWNa9axNCu1zFPWF4qv vz+KTchukdYOiLZBp52c29OCX/CCfVmF+MG2wdqjbndT5qHmrQqsgpxyEaRH8Pjrzt9/ yW9jy8/cY+DIDF7SyGa30Mi8MOOQQ7kjfMAAyofEpGFKNxvX1ktC2mgGaMUVdMJn0Isl v08A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=sNYlNJ75XoPPxaB5G2TMT4NGFMN2MQxFXvicqL7gevA=; b=7+2zuSBmCSqR5Du39q43fnwZfDjQg/fzS2U25xPf4QfvAcyryjupVhOLcpEkTGz3l7 +tgAFdy/SUDrskWoAmHmGoh2trC9QPBfl9weAq49A66J8mvvsDknxqkBmX4AVWNFVUQU /vqQpRo6lVnHpV9oCA8rkzCRc0Vlg0rIlhNS3jQUgJ5OsJi6QHbN0OT9HNINmcKETdQt blZ4fpnBSAkw++eiSGViGXSGkNk8Jmfuej1dRzoNx5I3A9pa/zwdedRaiocjEXPWgsZv TsqUPQWGQH7w+QpEm+PhnPrUziSo9+uaXhnEDcjT+rCtzBFluPbQ8Hh9jOFJZs3FYk79 viJw== X-Gm-Message-State: AOAM531cWYoTRpUq7g/USQ8LqjFYmyOhXPHWT3dqkXEnnUOicwRtBqf5 O6kvJV2L6GiNOsadXbobl7M= X-Google-Smtp-Source: ABdhPJzAek+4Z+5cznNwLEpKVsbLGE/NEI4Vq6E9HQkf7YHjbAIRR3o9tHTgML18pZXq64h5NIA4ZQ== X-Received: by 2002:adf:d087:: with SMTP id y7mr4044052wrh.274.1644336724825; Tue, 08 Feb 2022 08:12:04 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id w6sm11531033wrp.51.2022.02.08.08.12.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Feb 2022 08:12:04 -0800 (PST) Message-ID: <8f851902-0fec-f3cc-178f-836dc726bb20@yandex.ru> Date: Tue, 8 Feb 2022 18:12:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> <867da8x7v1.fsf@mail.linkov.net> <48a0ada9-c386-aca8-e3f4-ecece9defee5@yandex.ru> <86zgn2lbty.fsf@mail.linkov.net> <86a6f1eqar.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86a6f1eqar.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 08.02.2022 09:43, Juri Linkov wrote: > I see that > dired-do-find-regexp-and-replace replaces all matches, > but xref--query-replace-1 tries to skip some matches. > What test could emulate the case where some matches > should be skipped? Perhaps try xref-find-references-and-replace? Search for some symbol which can also be included as part of the other symbols' name. E.g. search for 'dired-do-find-regexp' and verify that 'dired-do-find-regexp-and-replace' is not affected. From unknown Sun Jun 22 11:46:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Feb 2022 19:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: sbaugh@catern.com, 53758@debbugs.gnu.org Received: via spool by 53758-submit@debbugs.gnu.org id=B53758.164434899029138 (code B ref 53758); Tue, 08 Feb 2022 19:37:02 +0000 Received: (at 53758) by debbugs.gnu.org; 8 Feb 2022 19:36:30 +0000 Received: from localhost ([127.0.0.1]:48718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHWHt-0007Zt-Pg for submit@debbugs.gnu.org; Tue, 08 Feb 2022 14:36:29 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:49139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHWHs-0007ZG-Kp; Tue, 08 Feb 2022 14:36:29 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 7E34060002; Tue, 8 Feb 2022 19:36:19 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> <867da8x7v1.fsf@mail.linkov.net> <48a0ada9-c386-aca8-e3f4-ecece9defee5@yandex.ru> <86zgn2lbty.fsf@mail.linkov.net> <86a6f1eqar.fsf@mail.linkov.net> <8f851902-0fec-f3cc-178f-836dc726bb20@yandex.ru> Date: Tue, 08 Feb 2022 21:35:43 +0200 In-Reply-To: <8f851902-0fec-f3cc-178f-836dc726bb20@yandex.ru> (Dmitry Gutov's message of "Tue, 8 Feb 2022 18:12:01 +0200") Message-ID: <86fsotjgmo.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 53758 29.0.50 thanks >> I see that >> dired-do-find-regexp-and-replace replaces all matches, >> but xref--query-replace-1 tries to skip some matches. >> What test could emulate the case where some matches >> should be skipped? > > Perhaps try xref-find-references-and-replace? > > Search for some symbol which can also be included as part of the other > symbols' name. > > E.g. search for 'dired-do-find-regexp' and verify that > 'dired-do-find-regexp-and-replace' is not affected. I see that these custom functions are needed in xref to search/replace the specific regexp ".*". Then this is the same problem like in bug#14013. So I fixed perform-replace to allow using isearch in a recursive edit, and closed this report. Other problems could be discussed in bug#14013.