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

Previous Next

Package: emacs;

Reported by: ture <at> turepalsson.se (Ture Pålsson)

Date: Fri, 22 May 2020 05:56:01 UTC

Severity: normal

Tags: patch

Found in version 26.3

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: ture <at> turepalsson.se, 41445 <at> debbugs.gnu.org
Subject: bug#41445: 26.3; Query-replace triggers "match data clobbered by..."
Date: Fri, 22 May 2020 15:35:38 +0300
> From: Mattias Engdegård <mattiase <at> acm.org>
> Date: Fri, 22 May 2020 14:21:04 +0200
> Cc: Ture Pålsson <ture <at> turepalsson.se>, 41445 <at> debbugs.gnu.org
> 
> 22 maj 2020 kl. 14.07 skrev Eli Zaretskii <eliz <at> gnu.org>:
> 
> > I think in ucs-normalize-hfs-nfd-post-read-conversion and
> > ucs-normalize-hfs-nfd-pre-write-conversion.  IOW, so that this only
> > affects encoding and decoding macOS file names.  WDYT?
> 
> Both of these call ucs-normalize-region, which makes it natural to save match data in that function. Conversely, anything that calls ucs-normalize-region would have to be wrapped, not just the two functions you mentioned. In other words, there seems to be no advantage in saving the match data in those functions, only disadvantages.

My line of reasoning was that only the callers of ENCODE_FILE and
DECODE_FILE will not expect the match-data to be clobbered.  Code that
calls ucs-normalize-region directly may or may not be bothered by the
clobbering, so we should leave that to the caller.

The advantage of not doing this unconditionally is that we don't
unnecessarily punishing callers that don't need match-data to be
saved.




This bug report was last modified 4 years and 364 days ago.

Previous Next


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