From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41445: 26.3; Query-replace triggers "match data clobbered by..." Date: Fri, 22 May 2020 15:35:38 +0300 Message-ID: <83pnaw2llx.fsf@gnu.org> References: <83367s4427.fsf@gnu.org> <370FA0D9-1EF2-4EC4-977C-C20106CF222D@acm.org> <83wo542mwz.fsf@gnu.org> <1FF1F90B-CA25-487B-BF5A-EE16E43CF50B@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="6382"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ture@turepalsson.se, 41445@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 22 14:36:16 2020 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 1jc6uN-0001a6-M0 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 May 2020 14:36:15 +0200 Original-Received: from localhost ([::1]:53192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc6uM-00049i-Ja for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 May 2020 08:36:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc6uA-0003mX-5i for bug-gnu-emacs@gnu.org; Fri, 22 May 2020 08:36:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jc6u9-00051r-Ra for bug-gnu-emacs@gnu.org; Fri, 22 May 2020 08:36:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jc6u9-0006pt-PO for bug-gnu-emacs@gnu.org; Fri, 22 May 2020 08:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 May 2020 12:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41445 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41445-submit@debbugs.gnu.org id=B41445.159015094226246 (code B ref 41445); Fri, 22 May 2020 12:36:01 +0000 Original-Received: (at 41445) by debbugs.gnu.org; 22 May 2020 12:35:42 +0000 Original-Received: from localhost ([127.0.0.1]:58329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jc6tq-0006pG-6X for submit@debbugs.gnu.org; Fri, 22 May 2020 08:35:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jc6to-0006p4-Jb for 41445@debbugs.gnu.org; Fri, 22 May 2020 08:35:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47290) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc6ti-0004uf-6I; Fri, 22 May 2020 08:35:34 -0400 Original-Received: from [176.228.60.248] (port=2244 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jc6th-0002Sr-Mo; Fri, 22 May 2020 08:35:34 -0400 In-Reply-To: <1FF1F90B-CA25-487B-BF5A-EE16E43CF50B@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Fri, 22 May 2020 14:21:04 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:180759 Archived-At: > From: Mattias Engdegård > Date: Fri, 22 May 2020 14:21:04 +0200 > Cc: Ture Pålsson , 41445@debbugs.gnu.org > > 22 maj 2020 kl. 14.07 skrev Eli Zaretskii : > > > 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.