From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#45516: 26.3; (elisp) `Modifying Strings': Mention `replace-regexp-in-string' Date: Mon, 28 Dec 2020 18:33:50 -0800 (PST) Message-ID: <0a54ff92-3337-44ec-8542-2b0065f67aaf@default> References: <87tus5h0i6.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6753"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45516@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 29 03:34:20 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 1ku4q4-0001fZ-9x for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 03:34:20 +0100 Original-Received: from localhost ([::1]:56136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ku4q3-0000N4-B1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Dec 2020 21:34:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ku4pn-0000Ms-4E for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2020 21:34:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53974) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ku4pm-0004si-JT for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2020 21:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ku4pm-0003tb-Eq for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2020 21:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Dec 2020 02:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45516 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 45516-submit@debbugs.gnu.org id=B45516.160920924014966 (code B ref 45516); Tue, 29 Dec 2020 02:34:02 +0000 Original-Received: (at 45516) by debbugs.gnu.org; 29 Dec 2020 02:34:00 +0000 Original-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 Original-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 Original-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== Original-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 Original-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 Original-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 Original-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 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)] 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-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:196910 Archived-At: > > 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?