From unknown Thu Aug 14 21:49:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#45516 <45516@debbugs.gnu.org> To: bug#45516 <45516@debbugs.gnu.org> Subject: Status: 26.3; (elisp) `Modifying Strings': Mention `replace-regexp-in-string' Reply-To: bug#45516 <45516@debbugs.gnu.org> Date: Fri, 15 Aug 2025 04:49:34 +0000 retitle 45516 26.3; (elisp) `Modifying Strings': Mention `replace-regexp-in= -string' reassign 45516 emacs submitter 45516 Drew Adams severity 45516 normal tag 45516 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 28 18:11:28 2020 Received: (at submit) by debbugs.gnu.org; 28 Dec 2020 23:11:28 +0000 Received: from localhost ([127.0.0.1]:37150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku1fk-0001AU-97 for submit@debbugs.gnu.org; Mon, 28 Dec 2020 18:11:28 -0500 Received: from lists.gnu.org ([209.51.188.17]:54616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku1fi-0001AM-F5 for submit@debbugs.gnu.org; Mon, 28 Dec 2020 18:11:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ku1fi-0005c2-7K for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2020 18:11:26 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:35846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ku1fg-0004ry-3N for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2020 18:11:25 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BSNBJgt067019 for ; Mon, 28 Dec 2020 23:11:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=Stg7ABl05hFXzW8oTxJfPSXSxgMJUAH+Hj0+r6CdqA0=; b=NJodz8OgcfkS2pavqgHu/15fcDQ2Bi6c5TaOTAdlGB1ED4tfJAQ0+x5oxgBGJ613GWbY dJ+l6XIwJcX+0R2brFflCnAWVXQYmb/zhQHzNA5E993SNiIiXn8FJedTSfaR8mIUyFAw 2GmfNh4cNbDHe5PM84JsRfGV6cq95rE8l4M20jKDPyzOnbJKLCO2iGCxECT+qeqC3Lm7 VSGuAafFZIUy4FFtsrX+RoYNWNaO7MOMPdM9EcOFHsAnL5J0LM14qOx3vxOtrFPPkqu3 uHNcqPozjQReh1y75TKzmM8fCPj7pdCKVJAnGwxNFb159fLqthZ26rn1oZ3vV+TtOO9B +Q== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 35nvkqmtpv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 28 Dec 2020 23:11:20 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BSN9tnN014647 for ; Mon, 28 Dec 2020 23:11:20 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 35pexqqxv5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 28 Dec 2020 23:11:20 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0BSNBH7a032250 for ; Mon, 28 Dec 2020 23:11:19 GMT MIME-Version: 1.0 Message-ID: Date: Mon, 28 Dec 2020 15:11:16 -0800 (PST) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 26.3; (elisp) `Modifying Strings': Mention `replace-regexp-in-string' X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5095.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9848 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 spamscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012280143 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9848 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 adultscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012280143 Received-SPF: pass client-ip=156.151.31.86; envelope-from=drew.adams@oracle.com; helo=userp2130.oracle.com X-Spam_score_int: -45 X-Spam_score: -4.6 X-Spam_bar: ---- X-Spam_report: (-4.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.178, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Subject line says it all. This is an important function for modifying strings. Please consider mentioning it, with a cross-reference. In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor `Microsoft Corp.', version 10.0.18362 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 28 20:19:58 2020 Received: (at 45516) by debbugs.gnu.org; 29 Dec 2020 01:19:58 +0000 Received: from localhost ([127.0.0.1]:37246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku3g6-0006L1-8U for submit@debbugs.gnu.org; Mon, 28 Dec 2020 20:19:58 -0500 Received: from quimby.gnus.org ([95.216.78.240]:48968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku3g4-0006Ki-7m for 45516@debbugs.gnu.org; Mon, 28 Dec 2020 20:19:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OvLGmXAkkL65zWoduRNbjkVUI4UTczaOVr1XEH6fPoU=; b=SBT+RQKumPQ+DQmDmvGE3X+mNf XdDsx0vF/WidYEiiGyboXS+9+rw4+IyoAIJc/AO3C1Dktuurd9JLSBtj5yU2Xdb0NklfKSSobG9Mx hKjLLMoK3Hhm7+/7G0UD+iQG8U4lqbD/NZZeA9vIXbdFOhTW4mRfpJZWx3YB2Oz2hZug=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ku3fv-0003Y3-3x; Tue, 29 Dec 2020 02:19:50 +0100 From: Lars Ingebrigtsen To: Drew Adams Subject: Re: bug#45516: 26.3; (elisp) `Modifying Strings': Mention `replace-regexp-in-string' References: X-Now-Playing: Marine's _The Fruit of the Original Sin_: "Animal in my Head" Date: Tue, 29 Dec 2020 02:19:45 +0100 In-Reply-To: (Drew Adams's message of "Mon, 28 Dec 2020 15:11:16 -0800 (PST)") Message-ID: <87tus5h0i6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams writes: > Subject line says it all. This is an important function for modifying > strings. Please consider mentioning it, with a cross-reference. That node is about destructively modifying strings. replace-regexp-in-string doesn't modify anything -- it returns a new string. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45516 Cc: 45516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Drew Adams writes: > Subject line says it all. This is an important function for modifying > strings. Please consider mentioning it, with a cross-reference. That node is about destructively modifying strings. replace-regexp-in-string doesn't modify anything -- it returns a new string. But it's odd that there's no mention of replace-regexp-in-string (and string-replace) in the Strings section, so I've now added a reference from the Creating Strings node. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 28 20:20:03 2020 Received: (at control) by debbugs.gnu.org; 29 Dec 2020 01:20:04 +0000 Received: from localhost ([127.0.0.1]:37250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku3gB-0006Lo-K6 for submit@debbugs.gnu.org; Mon, 28 Dec 2020 20:20:03 -0500 Received: from quimby.gnus.org ([95.216.78.240]:48982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku3gA-0006Kz-Km for control@debbugs.gnu.org; Mon, 28 Dec 2020 20:20:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=z3bFv+R5gTLYF+332QXkTlMl5Lwad1rjwsMThihbyjg=; b=SNjxX6v7UA3BW3rwi5PR677KLr yVZ8JqXIk1R9/ju79l5ANzXnaIndwsj143QamQx27+hoexRLRyeLv9A5XPv+2LcVeSf0De2wCv+Q3 0xD4sgHYw1QuDATXNSChiq11HDJygUf4L4QWk0pN/bDKSOcD1Hc08pbKacNcf/n3AkSA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ku3g3-0003YC-6r for control@debbugs.gnu.org; Tue, 29 Dec 2020 02:19:57 +0100 Date: Tue, 29 Dec 2020 02:19:54 +0100 Message-Id: <87sg7ph0hx.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #45516 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: tags 45516 fixed close 45516 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 45516 fixed close 45516 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 28 21:34:00 2020 Received: (at 45516) by debbugs.gnu.org; 29 Dec 2020 02:34:00 +0000 Received: from localhost ([127.0.0.1]:37287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku4pk-0003tJ-84 for submit@debbugs.gnu.org; Mon, 28 Dec 2020 21:34:00 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:53432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku4pj-0003t3-DT for 45516@debbugs.gnu.org; Mon, 28 Dec 2020 21:33:59 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BT2UZoN164280; Tue, 29 Dec 2020 02:33:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=NwE76D3YsJmGXEnHUjyLRSYPCMQcjhY3TiqmTqL2WOc=; b=csnP6CcH+zSsnTOfJZHjD1MRk3wlgRBTzT2xbGXOnepWNJgPPOh9R8szPxcw2pLfHFGD SW5E4mTa3zb+Sc5fEvesifVNw/bFuZZ3M+jstk46Vz3/MhL7B+1pXOs8mzzhs/PsC6hw 5udYN93Qq3HijWASaWyH4mjilWVcUeEi+C4FCTiIaZ0OaWmfs7gyWDU5tTbXWpdZi8hA c55pMupfucB8rY5qKdVWoPzZMikFCdwM9l65e4oUJborqAwlcEAF617MSao/iooGywrk XMUMHycAPZ/ahs1Qm2mgLi5d+XaGiRkieA4DrZ7VDn/1N5+ckSnhFXeaJmGJBWfT2LSj CA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 35ntpan350-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 29 Dec 2020 02:33:52 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BT2UtMW021796; Tue, 29 Dec 2020 02:33:52 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 35pf3w2q2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Dec 2020 02:33:51 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0BT2Xp6k014148; Tue, 29 Dec 2020 02:33:51 GMT MIME-Version: 1.0 Message-ID: <0a54ff92-3337-44ec-8542-2b0065f67aaf@default> Date: Mon, 28 Dec 2020 18:33:50 -0800 (PST) From: Drew Adams To: Lars Ingebrigtsen Subject: RE: bug#45516: 26.3; (elisp) `Modifying Strings': Mention `replace-regexp-in-string' References: <87tus5h0i6.fsf@gnus.org> In-Reply-To: <87tus5h0i6.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5095.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9848 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012290013 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9848 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 adultscore=0 mlxscore=0 mlxlogscore=999 clxscore=1011 phishscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012290013 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45516 Cc: 45516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > Subject line says it all. This is an important function for modifying > > strings. Please consider mentioning it, with a cross-reference. >=20 > That node is about destructively modifying strings. > replace-regexp-in-string doesn't modify anything -- it returns a new > string. >=20 > But it's odd that there's no mention of replace-regexp-in-string (and > string-replace) in the Strings section, so I've now added a reference > from the Creating Strings node. Yes, you're right that the functions described there are about destructively modifying. And thanks for making some changes for this bug. But nothing is said in that node about the kind of modification ("destructive") that's involved. A user can want to either modify in place or return a new string that's the same as some other string but with some changes. In some cases a user doesn't care which is done. I think there's room for doc improvement, for helping users finding functions that "modify" in either sense, and for making clear just which kind of "modifying" is meant for each case. You have a string "abcdefbca", and you want a string that is the same, but with "bc" replaced by "xy". What do you ask for in the Elisp manual, to find the info you need? From unknown Thu Aug 14 21:49:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 26 Jan 2021 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator