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#73018: 31.0.50; wdired + replace-regexp only modifies the visible portion of the buffer Date: Tue, 10 Sep 2024 09:28:50 +0300 Organization: LINKOV.NET Message-ID: <86tteo3wmh.fsf@mail.linkov.net> References: <20240904.080321.1100373523429404965.enometh@meer.net> <87seug85hh.fsf@web.de> <86y147gzx0.fsf@mail.linkov.net> <874j6uz4d8.fsf@web.de> <86ed5yujq3.fsf@mail.linkov.net> <87v7z9rnrp.fsf@web.de> <87o750dats.fsf@web.de> <868qw2ruv3.fsf@mail.linkov.net> <87bk0w511c.fsf@web.de> <86a5gg7nrs.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="803"; 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: Madhu , 73018@debbugs.gnu.org, Stefan Monnier To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 10 08: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 1snubs-000AdP-1g for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Sep 2024 08: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 1snubX-0002kI-U8; Tue, 10 Sep 2024 02:44:00 -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 1snubW-0002gj-Ps for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 02:43:58 -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 1snubV-0006ON-Q3 for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 02:43:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=uuBzoAZwSOnW1bQMCzLHm5VE+c8yp6oBYNDd03DZlyQ=; b=GhDDutmcckd+JJcV/J/JX6ImRemgIc08M5KelnRwvAG7YD5BtbB92uxCiSw30JAs7HvHelmr8vSA1ThreiOkMP/U4Ly8Pm74uznsF3sfL9NKVGBhsrUVmCr0DBn/pYp8f2XAVjgqSsAWnjVhYZ3o42cxCjobgr86YmTF9bqeD1CwD8LN4mJc7sdg6Ki3YqDE8a52/Dx5Sy+dUJ0uyG2zyq1TuKhkSwFhQ0HbU/R9gnY+vp6VtSkbTK8MiPNpdaA4a9ma5KNlkmNYeTRNC1J0/M/tI8ZTuuzjKY7UOVa8EBUI4f+wQdxIBXov9hO15MhNPh2vSZOKLN2sji0Fmg8qYQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1snuba-0008Sc-3R for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 02:44: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: Tue, 10 Sep 2024 06:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73018 X-GNU-PR-Package: emacs Original-Received: via spool by 73018-submit@debbugs.gnu.org id=B73018.172595060532462 (code B ref 73018); Tue, 10 Sep 2024 06:44:02 +0000 Original-Received: (at 73018) by debbugs.gnu.org; 10 Sep 2024 06:43:25 +0000 Original-Received: from localhost ([127.0.0.1]:34688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snuaz-0008RW-6A for submit@debbugs.gnu.org; Tue, 10 Sep 2024 02:43:25 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:58935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snuax-0008RB-4k for 73018@debbugs.gnu.org; Tue, 10 Sep 2024 02:43:24 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 299EB60002; Tue, 10 Sep 2024 06:42:48 +0000 (UTC) In-Reply-To: <86a5gg7nrs.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 09 Sep 2024 20:14:15 +0300") 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:291543 Archived-At: >>> Also noticed that doing the first replacement always raises an error: >>> >>> Debugger entered--Lisp error: (error "Match data clobbered by buffer >>> modification hooks") >>> replace-match("!" nil nil) >>> replace-match-maybe-edit("!" nil nil nil (672 673 #) nil) >>> perform-replace("7" "!" t t nil nil nil nil nil nil nil) >>> query-replace-regexp("7" "!" nil nil nil nil nil) >>> funcall-interactively(query-replace-regexp "7" "!" nil nil nil nil nil) >>> command-execute(query-replace-regexp) >> >> Do I interpret the code in replace_match correctly: this error doesn't >> even mean the match data has been clobbered - only that modification >> hooks called searching functions? I don't know what the referenced >> search_regs.num_regs exactly contains. But we already seem to ensure >> not to clobber match data. > > It fails in emacs-30, but not in emacs-29. > So this is a regression. This is caused by commit 63588775fcb, so Cc-ing Stefan. But probably this commit just exposed the problem that existed before? Anyway here is 100% reproducible recipe: 0. emacs -Q 1. 'C-x C-q' in a Dired with symlinks 2. 'C-M-% some_part_of_symlink RET anything RET' 3. 'y' => (error "Match data clobbered by buffer modification hooks") This happens only for the first replacement after `emacs -Q`.