From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens Schmidt via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65536: 30.0.50; replace-regexp-in-string documentation does not mention it saves match data Date: Fri, 25 Aug 2023 15:16:29 +0200 Message-ID: Reply-To: Jens Schmidt Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26605"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 To: 65536@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 25 15:18:28 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 1qZWho-0006gg-D9 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Aug 2023 15:18:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZWhV-0000MJ-1n; Fri, 25 Aug 2023 09:18:09 -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 1qZWhK-0000Lx-0h for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 09:17:59 -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 1qZWhJ-0000f6-P9 for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 09:17:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZWhN-0003O9-RR for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 09:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jens Schmidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2023 13:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65536 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169296943412969 (code B ref -1); Fri, 25 Aug 2023 13:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Aug 2023 13:17:14 +0000 Original-Received: from localhost ([127.0.0.1]:39650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZWgb-0003N6-Ja for submit@debbugs.gnu.org; Fri, 25 Aug 2023 09:17:13 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:45700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZWgX-0003Mn-Es for submit@debbugs.gnu.org; Fri, 25 Aug 2023 09:17:12 -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 1qZWgM-0000IV-Gp for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 09:16:58 -0400 Original-Received: from mr4.vodafonemail.de ([145.253.228.164]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qZWgI-0000R7-Tu for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 09:16:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1692969405; bh=weLvxfuz+rzKRBw+Fh7A3dI8IZNt/8cWHlUyk2x0FHw=; h=Message-ID:Date:User-Agent:Content-Language:From:Subject:To: Content-Type:From; b=XCUTQuEKW0nFw4WguJ+AHZHxwXPvhQsFqVC/Un2A0ItSFvGF2aPIJuXIkt7tguyIG wzhjHWTbP1neI6bz8rj1sxGIxN8eST8bECTpHKQFKsEcihbMZTsw9q8PDctPREatjI mfpb+cgss4/MgHsbZjTkFr+FzoDcwEHuE2MbWYt4= Original-Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4RXL7x5Ykhz1xxq for ; Fri, 25 Aug 2023 13:16:45 +0000 (UTC) Original-Received: from [192.168.0.138] (unknown [86.33.87.7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4RXL7s1tnszHnfp for ; Fri, 25 Aug 2023 13:16:38 +0000 (UTC) Content-Language: de-DE-frami, en-US X-purgate-type: clean X-purgate: clean X-purgate-size: 567 X-purgate-ID: 155817::1692969401-9DFFE94E-EE681136/0/0 Received-SPF: pass client-ip=145.253.228.164; envelope-from=jschmidt4gnu@vodafonemail.de; helo=mr4.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:268433 Archived-At: Not sure about this one, maybe I have overlooked something ... The Emacs Lisp manual says: Notice that all functions are allowed to overwrite the match data unless they’re explicitly documented not to do so. And in particular function `replace-regexp-in-string' could be assumed to modify the match data, but it uses an explicit call to `save-match-data' to not do so. Maybe this should be explicitly documented in its doc string and/or the Emacs Lisp manual ((elisp) Search and Replace) so that users of the function can rely on that fact?