From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#65536: 30.0.50; replace-regexp-in-string documentation does not mention it saves match data Date: Sat, 26 Aug 2023 06:24:55 +0000 Message-ID: <87zg2e9v7s.fsf@localhost> References: <837cpjnr2b.fsf@gnu.org> <8e1911a9-1944-c018-f108-fb34323b361f@vodafonemail.de> <83il92mj20.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2927"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65536@debbugs.gnu.org, Jens Schmidt , Stefan Kangas To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 26 08:25:10 2023 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 1qZmjO-0000XJ-9X for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Aug 2023 08:25:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZmjD-0006NJ-H5; Sat, 26 Aug 2023 02:24:59 -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 1qZmjB-0006N4-G3 for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 02:24:57 -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 1qZmjB-0004Qe-7o for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 02:24:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZmjF-0001Pu-SZ for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 02:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Aug 2023 06:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65536 X-GNU-PR-Package: emacs Original-Received: via spool by 65536-submit@debbugs.gnu.org id=B65536.16930310875423 (code B ref 65536); Sat, 26 Aug 2023 06:25:01 +0000 Original-Received: (at 65536) by debbugs.gnu.org; 26 Aug 2023 06:24:47 +0000 Original-Received: from localhost ([127.0.0.1]:41539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZmj1-0001PP-0X for submit@debbugs.gnu.org; Sat, 26 Aug 2023 02:24:47 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:58647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZmiy-0001P9-4x for 65536@debbugs.gnu.org; Sat, 26 Aug 2023 02:24:46 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 07B86240028 for <65536@debbugs.gnu.org>; Sat, 26 Aug 2023 08:24:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693031073; bh=FtdmYtsgRpyGmCbgnpfi6UzGuX6HD9Luah9MNvjZe5U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=DaTSzRiwViRuh5Ch4erIrpm4hYX1GTyxNrOqS1rSC2TCLn1KJfGamF621HJ8wSgIO mOuAVBmFanOBKkUqilZFgBCm/yiKIOwZkfYyZvVlpHR8Hjn78zwRZo5muYVvA7TKn8 /Gpyx0NzyW79Km0fjGYIGjPikn/l5tyktkY11uia/AJuyQHMZ4anT5dTGOlS24exVh UNiVza0wxnkQVelSdXfIRHvYKACimvCSFiNMddUDK3TAb/M/zcMjAgI0xWRWJ4ctb9 FnBaAROzieOkw+e1Q89V5tyhaQQ13TL/Gsbhn3ivUY2LtCBxPHQ5Z26L7x8+WcWXre RmG64mGJdUVaA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RXmxr1qJKz6v3j; Sat, 26 Aug 2023 08:24:32 +0200 (CEST) In-Reply-To: <83il92mj20.fsf@gnu.org> 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:268470 Archived-At: Eli Zaretskii writes: >> NOTE: The convention in Elisp is that any function, except for a few >> exceptions like car/assoc/+/goto-char, can clobber the match data, >> so =E2=80=98save-match-data=E2=80=99 should normally be used to save *= your* match data >> rather than your caller=E2=80=99s match data. >>=20 >> The final decision is yours ... > > I think it's okay to leave things as they are. I can share some experience from me dropping some `save-match-data' from Org parser - I had to fight the consequences, as a lot of Org's own code implicitly assumed that match data is saved, which caused huge number of tests to fail. Fixing this was not fun, although I was able to do it because that particular function had a history modifying match data in the past and only relatively recent code additions were affected. If something like `replace-regexp-in-string' suddenly changes its behaviour (even undocumented), I expect issues in third-party code. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at