GNU bug report logs - #41445
26.3; Query-replace triggers "match data clobbered by..."

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: ture@HIDDEN (Ture Pålsson); Keywords: patch; dated Fri, 22 May 2020 05:56:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 41445 <at> debbugs.gnu.org:


Received: (at 41445) by debbugs.gnu.org; 22 May 2020 11:16:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 07:16:12 2020
Received: from localhost ([127.0.0.1]:58175 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc5eu-0002gF-7Q
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 07:16:12 -0400
Received: from mail178c50.megamailservers.eu ([91.136.10.188]:41566
 helo=mail70c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1jc5er-0002g4-Mr
 for 41445 <at> debbugs.gnu.org; Fri, 22 May 2020 07:16:10 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1590146167;
 bh=HLhKuWii4KfpvUd13tw/YY5yiruHPw0/6RPIgpv04jc=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=scSDJdVm9cNJOABJ3xAQHxXX2+31t0WnfGByqeuWU0e61m1KhQOaqhz1YsRnWvArB
 GbSbV38NPJmV7SCmaTggn/itCfMNaPW5X9qX/e6spYpFCICQNC1dkTdLsKLAZIFzER
 Ldcf1DJKE1exL1uRU7HNJX2eU4SUiEtPqZ1aqAKY=
Feedback-ID: mattiase@HIDDEN
Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se
 [85.230.74.78]) (authenticated bits=0)
 by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 04MBG4kr007445; 
 Fri, 22 May 2020 11:16:06 +0000
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\))
Subject: Re: bug#41445: 26.3; Query-replace triggers "match data clobbered
 by..."
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <83367s4427.fsf@HIDDEN>
Date: Fri, 22 May 2020 13:16:04 +0200
Content-Transfer-Encoding: 7bit
Message-Id: <370FA0D9-1EF2-4EC4-977C-C20106CF222D@HIDDEN>
References: <m2zha0o8vn.fsf@HIDDEN>
 <B49CCB00-5C7B-4E04-A134-AEACDE273928@HIDDEN> <83367s4427.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.14)
X-CTCH-RefID: str=0001.0A782F27.5EC7B42F.000C:SCFSTAT68638221, ss=1, re=-4.000,
 recu=0.000, reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: -4.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=OKBZIhSB c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117
 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=mDV3o1hIAAAA:8 a=0BR4sqtr0PjXxpadsQwA:9 a=CjuIK1q_8ugA:10
 a=ncZ9vwaUYPMA:10 a=_FVE-zBwftR9WsbkzFJk:22
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  22 maj 2020 kl. 13.11 skrev Eli Zaretskii <eliz@HIDDEN>:
 > Is that the right place to save-match-data, though? Should we perhaps >
 do that where utf-8-hfs file names are encoded? What location did you have
 in mind, more precisely? 
 Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: gnu.org]
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.3 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 41445
Cc: ture@HIDDEN, 41445 <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: -0.0 (/)

22 maj 2020 kl. 13.11 skrev Eli Zaretskii <eliz@HIDDEN>:

> Is that the right place to save-match-data, though?  Should we perhaps
> do that where utf-8-hfs file names are encoded?

What location did you have in mind, more precisely?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41445; Package emacs. Full text available.

Message received at 41445 <at> debbugs.gnu.org:


Received: (at 41445) by debbugs.gnu.org; 22 May 2020 11:11:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 07:11:57 2020
Received: from localhost ([127.0.0.1]:58160 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc5an-0002ZC-Mx
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 07:11:57 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54110)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jc5ad-0002Ys-MM
 for 41445 <at> debbugs.gnu.org; Fri, 22 May 2020 07:11:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41662)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jc5aX-0005FW-02; Fri, 22 May 2020 07:11:41 -0400
Received: from [176.228.60.248] (port=1053 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jc5aW-0001hq-7Q; Fri, 22 May 2020 07:11:40 -0400
Date: Fri, 22 May 2020 14:11:44 +0300
Message-Id: <83367s4427.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <B49CCB00-5C7B-4E04-A134-AEACDE273928@HIDDEN> (message from
 Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 22 May 2020 12:46:03 +0200)
Subject: Re: bug#41445: 26.3;
 Query-replace triggers "match data clobbered by..."
References: <m2zha0o8vn.fsf@HIDDEN>
 <B49CCB00-5C7B-4E04-A134-AEACDE273928@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41445
Cc: ture@HIDDEN, 41445 <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: -3.3 (---)

> From: Mattias Engdegård <mattiase@HIDDEN>
> Date: Fri, 22 May 2020 12:46:03 +0200
> Cc: 41445 <at> debbugs.gnu.org
> 
> Thank you! Clearly nobody expects normalisation functions to clobber match data.

Is that the right place to save-match-data, though?  Should we perhaps
do that where utf-8-hfs file names are encoded?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41445; Package emacs. Full text available.
Added tag(s) patch. Request was from Mattias Engdegård <mattiase@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 41445 <at> debbugs.gnu.org:


Received: (at 41445) by debbugs.gnu.org; 22 May 2020 10:46:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 06:46:20 2020
Received: from localhost ([127.0.0.1]:58139 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc5Bx-0008EZ-0D
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 06:46:20 -0400
Received: from mail204c50.megamailservers.eu ([91.136.10.214]:35904
 helo=mail193c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>)
 id 1jc5Bo-0008EC-Fo; Fri, 22 May 2020 06:46:15 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1590144366;
 bh=/UP2SDJSecbRrt6xxJKPSVMhdow75nbFI6xNAf5jkdU=;
 h=From:Date:Subject:Cc:To:From;
 b=MtccXuhPc4yIX6hgGYihF2IGjd1ePWd6c/pNzGHyjI29QrbSU/1iHZZEISSWAP+SW
 qTj37LWx/W27F3ANPcmJfvtgYEsL/chBFdRjq5+rBJ6UUQsyBmid9McGFqWsHD1o0G
 cedVTtQD2ZZjwe4DUZIRvE0vMwNJoO2nsiDiY18c=
Feedback-ID: mattiase@HIDDEN
Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se
 [85.230.74.78]) (authenticated bits=0)
 by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 04MAk3f7024458; 
 Fri, 22 May 2020 10:46:05 +0000
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
Content-Type: multipart/mixed;
 boundary="Apple-Mail=_8B9F84BB-81FA-413B-B6D2-B52CC23BB2FA"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\))
Date: Fri, 22 May 2020 12:46:03 +0200
Subject: bug#41445: 26.3; Query-replace triggers "match data clobbered by..." 
To: =?utf-8?Q?Ture_P=C3=A5lsson?= <ture@HIDDEN>
Message-Id: <B49CCB00-5C7B-4E04-A134-AEACDE273928@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.14)
X-CTCH-RefID: str=0001.0A782F20.5EC7ACF0.0015:SCFSTAT68638221, ss=1, re=-4.000,
 recu=0.000, reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: -4.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=cM2eTWWN c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117
 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=M51BFTxLslgA:10 a=u6k3N8fo-Y5wVBJ_FJoA:9
 a=CjuIK1q_8ugA:10 a=wzIG3FNt2CT_li0VqwcA:9 a=B2y7HmGcmWMA:10
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41445
Cc: 41445 <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: -0.0 (/)


--Apple-Mail=_8B9F84BB-81FA-413B-B6D2-B52CC23BB2FA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

tags 41445 patch
stop

Thank you! Clearly nobody expects normalisation functions to clobber =
match data.


--Apple-Mail=_8B9F84BB-81FA-413B-B6D2-B52CC23BB2FA
Content-Disposition: attachment;
	filename=0001-Don-t-clobber-match-data-in-Unicode-normalisation-bu.patch
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="0001-Don-t-clobber-match-data-in-Unicode-normalisation-bu.patch"
Content-Transfer-Encoding: quoted-printable

=46rom=20851cbe5507e872d8649d457889c4f87395bd63c2=20Mon=20Sep=2017=20=
00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20=
<mattiase@HIDDEN>=0ADate:=20Fri,=2022=20May=202020=2012:21:28=20+0200=0A=
Subject:=20[PATCH]=20Don't=20clobber=20match=20data=20in=20Unicode=20=
normalisation=20(bug#41445)=0AMIME-Version:=201.0=0AContent-Type:=20=
text/plain;=20charset=3DUTF-8=0AContent-Transfer-Encoding:=208bit=0A=0A=
Suggested=20by=20Ture=20P=C3=A5lsson.=0A=0A*=20=
lisp/international/ucs-normalize.el=20(ucs-normalize-region):=0AWrap=20=
regexp=20searches=20in=20save-match-data.=0A*=20=
test/lisp/international/ucs-normalize-tests.el=0A=
(ucs-normalize-save-match-data):=20New=20test.=0A---=0A=20=
lisp/international/ucs-normalize.el=20=20=20=20=20=20=20=20=20=20=20|=20=
33=20++++++++++---------=0A=20=
.../lisp/international/ucs-normalize-tests.el=20|=2011=20+++++++=0A=202=20=
files=20changed,=2028=20insertions(+),=2016=20deletions(-)=0A=0Adiff=20=
--git=20a/lisp/international/ucs-normalize.el=20=
b/lisp/international/ucs-normalize.el=0Aindex=20201ff6b9b1..6bc08c247b=20=
100644=0A---=20a/lisp/international/ucs-normalize.el=0A+++=20=
b/lisp/international/ucs-normalize.el=0A@@=20-511,22=20+511,23=20@@=20=
ucs-normalize-region=0A=20COMPOSITION-PREDICATE=20will=20be=20used=20to=20=
compose=20region."=0A=20=20=20(save-excursion=0A=20=20=20=20=20=
(save-restriction=0A-=20=20=20=20=20=20(narrow-to-region=20from=20to)=0A=
-=20=20=20=20=20=20(goto-char=20(point-min))=0A-=20=20=20=20=20=20(let=20=
(start-pos=20starter)=0A-=20=20=20=20=20=20=20=20(while=20=
(re-search-forward=20quick-check-regexp=20nil=20t)=0A-=20=20=20=20=20=20=20=
=20=20=20(setq=20starter=20(string-to-char=20(match-string=200)))=0A-=20=20=
=20=20=20=20=20=20=20=20(setq=20start-pos=20(match-beginning=200))=0A-=20=
=20=20=20=20=20=20=20=20=20(ucs-normalize-block=0A-=20=20=20=20=20=20=20=20=
=20=20=20;;=20from=0A-=20=20=20=20=20=20=20=20=20=20=20(if=20(or=20(=3D=20=
start-pos=20(point-min))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20(and=20(=3D=200=20(ucs-normalize-ccc=20starter))=0A-=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(not=20=
(memq=20starter=20ucs-normalize-combining-chars))))=0A-=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20start-pos=20(1-=20start-pos))=0A-=20=20=20=20=20=
=20=20=20=20=20=20;;=20to=0A-=20=20=20=20=20=20=20=20=20=20=20(if=20=
(looking-at=20ucs-normalize-combining-chars-regexp)=0A-=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20(match-end=200)=20(1+=20start-pos))=0A-=20=20=20=
=20=20=20=20=20=20=20=20translation-table=20composition-predicate))))))=0A=
+=20=20=20=20=20=20(save-match-data=0A+=20=20=20=20=20=20=20=20=
(narrow-to-region=20from=20to)=0A+=20=20=20=20=20=20=20=20(goto-char=20=
(point-min))=0A+=20=20=20=20=20=20=20=20(let=20(start-pos=20starter)=0A+=20=
=20=20=20=20=20=20=20=20=20(while=20(re-search-forward=20=
quick-check-regexp=20nil=20t)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=
(setq=20starter=20(string-to-char=20(match-string=200)))=0A+=20=20=20=20=20=
=20=20=20=20=20=20=20(setq=20start-pos=20(match-beginning=200))=0A+=20=20=
=20=20=20=20=20=20=20=20=20=20(ucs-normalize-block=0A+=20=20=20=20=20=20=20=
=20=20=20=20=20=20;;=20from=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=
(if=20(or=20(=3D=20start-pos=20(point-min))=0A+=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20(and=20(=3D=200=20(ucs-normalize-ccc=20=
starter))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20(not=20(memq=20starter=20=
ucs-normalize-combining-chars))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20start-pos=20(1-=20start-pos))=0A+=20=20=20=20=20=20=20=20=20=
=20=20=20=20;;=20to=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20=
(looking-at=20ucs-normalize-combining-chars-regexp)=0A+=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20(match-end=200)=20(1+=20start-pos))=0A+=20=
=20=20=20=20=20=20=20=20=20=20=20=20translation-table=20=
composition-predicate)))))))=0A=20=0A=20;;=20=
--------------------------------------------------------------------------=
------=0A=20=0Adiff=20--git=20=
a/test/lisp/international/ucs-normalize-tests.el=20=
b/test/lisp/international/ucs-normalize-tests.el=0Aindex=20=
c36808ad72..2c60bd318a=20100644=0A---=20=
a/test/lisp/international/ucs-normalize-tests.el=0A+++=20=
b/test/lisp/international/ucs-normalize-tests.el=0A@@=20-341,4=20+341,15=20=
@@=20ucs-normalize-check-failing-lines=0A=20=20=20=20=20=20=20=20=20=20=20=
(display-buffer=20(current-buffer)))=0A=20=20=20=20=20=20=20(message=20=
"No=20changes=20to=20failing=20lines=20needed"))))=0A=20=0A+(ert-deftest=20=
ucs-normalize-save-match-data=20()=0A+=20=20"Verify=20that=20match=20=
data=20isn't=20clobbered=20(bug#41445)"=0A+=20=20(string-match=20(rx=20=
(+=20digit))=20"a47b")=0A+=20=20(should=20(equal=20(match-data=20t)=20=
'(1=203)))=0A+=20=20(should=20(equal=0A+=20=20=20=20=20=20=20=20=20=20=20=
(decode-coding-string=0A+=20=20=20=20=20=20=20=20=20=20=20=20=
(encode-coding-string=20"K=C3=A4seso=C3=9Fenr=C3=BChrl=C3=B6ffel"=20=
'utf-8-hfs)=0A+=20=20=20=20=20=20=20=20=20=20=20=20'utf-8-hfs)=0A+=20=20=20=
=20=20=20=20=20=20=20=20"K=C3=A4seso=C3=9Fenr=C3=BChrl=C3=B6ffel"))=0A+=20=
=20(should=20(equal=20(match-data=20t)=20'(1=203))))=0A+=0A=20;;;=20=
ucs-normalize-tests.el=20ends=20here=0A--=20=0A2.21.1=20(Apple=20=
Git-122.3)=0A=0A=

--Apple-Mail=_8B9F84BB-81FA-413B-B6D2-B52CC23BB2FA--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41445; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 May 2020 05:55:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 01:55:36 2020
Received: from localhost ([127.0.0.1]:57884 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc0eb-0007NE-GW
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 01:55:36 -0400
Received: from lists.gnu.org ([209.51.188.17]:41304)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <SRS0+e5b6=7E=turepalsson.se=ture@HIDDEN>)
 id 1jc0A6-0006aw-9k
 for submit <at> debbugs.gnu.org; Fri, 22 May 2020 01:24:02 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60244)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1)
 (envelope-from <SRS0+e5b6=7E=turepalsson.se=ture@HIDDEN>)
 id 1jc0A6-0003wO-4k
 for bug-gnu-emacs@HIDDEN; Fri, 22 May 2020 01:24:02 -0400
Received: from mail.lysator.liu.se ([130.236.254.3]:47371)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1)
 (envelope-from <SRS0+e5b6=7E=turepalsson.se=ture@HIDDEN>)
 id 1jc0A1-0002kY-OK
 for bug-gnu-emacs@HIDDEN; Fri, 22 May 2020 01:24:01 -0400
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
 by mail.lysator.liu.se (Postfix) with ESMTP id 1695140010
 for <bug-gnu-emacs@HIDDEN>; Fri, 22 May 2020 07:23:43 +0200 (CEST)
Received: by mail.lysator.liu.se (Postfix, from userid 1004)
 id 03E4040012; Fri, 22 May 2020 07:23:42 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 bernadotte.lysator.liu.se
X-Spam-Level: 
X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,AWL
 autolearn=disabled version=3.4.2
X-Spam-Score: -0.8
Received: from pommac.localdomain
 (c-e27871d5.012-237-73746f22.bbcust.telenor.se [213.113.120.226])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.lysator.liu.se (Postfix) with ESMTPSA id 94BD740010;
 Fri, 22 May 2020 07:23:40 +0200 (CEST)
Received: by pommac.localdomain (Postfix, from userid 501)
 id 4EA45302E3CC9B; Fri, 22 May 2020 07:23:38 +0200 (CEST)
From: ture@HIDDEN (Ture =?utf-8?Q?P=C3=A5lsson?=)
To: bug-gnu-emacs@HIDDEN
Subject: 26.3; Query-replace triggers "match data clobbered by..."
Date: Fri, 22 May 2020 07:07:24 +0200
Message-ID: <m2zha0o8vn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: ClamAV using ClamSMTP
Received-SPF: pass client-ip=130.236.254.3;
 envelope-from=SRS0+e5b6=7E=turepalsson.se=ture@HIDDEN;
 helo=mail.lysator.liu.se
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/22 01:23:43
X-ACL-Warn: Detected OS   = Linux 3.11 and newer
X-Spam_score_int: -39
X-Spam_score: -4.0
X-Spam_bar: ----
X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 22 May 2020 01:55:32 -0400
Cc: ture@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: -2.4 (--)


1. Run macOS (Catalina, in my case, but I don't think it matters.)

2. Have a folder named "=C3=A4" (that's a single character, U+00E4)
   and a file in it.

3. Visit that file.

4. While the file is not modified, do a query-replace that will replace
   something.

5. When Emacs asks about the first replacement, type 'y'.

=3D=3D> You get an error message, "Match data clobbered by buffer
modification hooks".

Setting before-change-functions, after-change-functions, and
first-change-hook all to nil does not make the problem go away.

However, setting inhibit-modification-hooks to t *does* make it go away.

Running Emacs in a debugger, I notice that the first modification of the
buffer calls lock_file, which calls code_convert_string which, through a
long series of Emacs Lisp calls end up calling re-search-forward. I have
not tried to unravel this call chain, but:

The function ucs-normalize-region calls re-search-forward. If I wrap
that call in save-match-data, the problem goes away!


In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Ve=
rsion 10.14.3 (Build 18D109))
 of 2019-09-02 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1894
Recent messages:
Mark saved where search started
Mark set


Mark saved where search started
Mark set
Mark saved where search started
Making completion list...
Quit
Auto-saving...
Saving file /Users/ture/Desktop/emacs/lisp/international/ucs-normalize.el...
Wrote /Users/ture/Desktop/emacs/lisp/international/ucs-normalize.el
Quit
Configured using:
 'configure --with-ns '--enable-locallisppath=3D/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings:
  value of $LC_CTYPE: sv_SE.UTF-8
  value of $LANG: en_SE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  bug-reference-prog-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-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
  line-number-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny format-spec rfc822 mml
mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
completion pulse find-dired semantic/fw xref project dired-aux dired
dired-loaddefs ibuf-ext ibuffer ibuffer-loaddefs loadhist mode-local
find-func apropos shell pcomplete grep compile comint ring bug-reference
map cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs pp cl-print thingatpt help-fns radix-tree
jka-compr info misearch multi-isearch vc-git diff-mode easy-mmode view
elec-pair ansi-color iso-transl cl-extra help-mode cl finder-inf package
easymenu epg-config url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt
gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame 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 charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 411912 23871)
 (symbols 48 28246 5)
 (miscs 40 341 2088)
 (strings 32 61990 7915)
 (string-bytes 1 1687293)
 (vectors 16 52073)
 (vector-slots 8 1712291 139060)
 (floats 8 71 567)
 (intervals 56 32656 600)
 (buffers 992 37))




Acknowledgement sent to ture@HIDDEN (Ture Pålsson):
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#41445; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 22 May 2020 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.