From unknown Thu Sep 18 18:20:05 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#56522 <56522@debbugs.gnu.org> To: bug#56522 <56522@debbugs.gnu.org> Subject: Status: 28.1.50; Mismatch data after replace undo Reply-To: bug#56522 <56522@debbugs.gnu.org> Date: Fri, 19 Sep 2025 01:20:05 +0000 retitle 56522 28.1.50; Mismatch data after replace undo reassign 56522 emacs submitter 56522 Juri Linkov severity 56522 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 12 13:55:09 2022 Received: (at submit) by debbugs.gnu.org; 12 Jul 2022 17:55:09 +0000 Received: from localhost ([127.0.0.1]:43632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBK6H-0001u3-Cw for submit@debbugs.gnu.org; Tue, 12 Jul 2022 13:55:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:47322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBK6E-0001tv-QM for submit@debbugs.gnu.org; Tue, 12 Jul 2022 13:55:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBK6E-0006qo-IM for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2022 13:55:06 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:42641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBK6C-0004H3-Qt for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2022 13:55:06 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id B6A7A1BF205 for ; Tue, 12 Jul 2022 17:55:01 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 28.1.50; Mismatch data after replace undo Organization: LINKOV.NET Date: Tue, 12 Jul 2022 20:46:37 +0300 Message-ID: <86v8s21awy.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; charset=utf-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.183.201; envelope-from=juri@linkov.net; helo=relay8-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit 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: -2.7 (--) X-Debbugs-CC: Tino Calancha Something is wrong with next-replacement that is not updated after Undo in perform-replace. The minimal test case: 1. add to a buffer such text: a! b? . 2. then invoke query-replace-regexp with such regexp: Query replace regexp: \([!?]\) → <\1> 3. then type: y u n y (i.e. yes, undo, no, yes - that should undo, leave the first match unchanged, and replace the second) 4. observe the result: a! b . i.e. the match data in next-replacement for the second match comes from the first match.