From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64960: Documentation for copy-sequence Date: Mon, 31 Jul 2023 06:19:46 +0000 Message-ID: References: <83leex2qmn.fsf@gnu.org> <83ila03jnr.fsf@gnu.org> <877cqgwt4q.fsf@web.de> Reply-To: uzibalqa 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="10794"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64960@debbugs.gnu.org, eliz@gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 31 08:20:18 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 1qQMGQ-0002bv-74 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Jul 2023 08:20:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQMGD-0001rk-Cs; Mon, 31 Jul 2023 02:20:05 -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 1qQMGB-0001ra-C5 for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2023 02:20:03 -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 1qQMGB-0003CZ-33 for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2023 02:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qQMGA-0000FH-1m for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2023 02:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: uzibalqa Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Jul 2023 06:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64960 X-GNU-PR-Package: emacs Original-Received: via spool by 64960-submit@debbugs.gnu.org id=B64960.1690784400932 (code B ref 64960); Mon, 31 Jul 2023 06:20:02 +0000 Original-Received: (at 64960) by debbugs.gnu.org; 31 Jul 2023 06:20:00 +0000 Original-Received: from localhost ([127.0.0.1]:51627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQMG8-0000Ey-AA for submit@debbugs.gnu.org; Mon, 31 Jul 2023 02:20:00 -0400 Original-Received: from mail-4318.protonmail.ch ([185.70.43.18]:62663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQMG5-0000Ef-Vd for 64960@debbugs.gnu.org; Mon, 31 Jul 2023 02:19:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1690784391; x=1691043591; bh=bOk9OsLJWFrdzDrRxB5JzF4tz5PsQsyQS7f5xxzkJHk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=kw1XXqirXK+O3SGQHA92q2/d0JldxbCxw0qoHcgaiOuzY/dZWdBB3Tka3ctIZhC/q N4cO2fVQ7erF555bAoEdS51Ik9KwAwpI1J6fTS5rNZZyKhSbG9nbuH8q+xuAGTOWNa 5Vc9kiah2Cuh/b1LMHFDZXbNdb47MaabEm8kMSDKiVQ8vFDIZ73hIhE6m11w5/N+zH /goSR7tVvQYdZEb9z3cE2NnaxRscHL0O0KouCQtVFZnGK/9crEcYM8TqPx18RHczvn lGYTEs2OOoW1H+XDALHeaf8tVL2N12rjTVZLSLB6XxP+pqWaamte7A1D6bPozaN3h7 +UeM9QVmVL2RA== In-Reply-To: <877cqgwt4q.fsf@web.de> Feedback-ID: 52887082:user:proton 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:266396 Archived-At: ------- Original Message ------- On Monday, July 31st, 2023 at 5:24 PM, Michael Heerdegen wrote: > uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text > editors" bug-gnu-emacs@gnu.org writes: >=20 > > > > When I modify the copy, the original remains intact. > > >=20 > > > No, if you modify an element of the copy, the corresponding element o= f > > > the original is also changed. That's what "shared" means. > >=20 > > Except for strings >=20 >=20 > It is irrelevant what happens when you modify elements of a copied > string because it is impossible. The statement is simply not applicable > to strings. That's why the docstring only speaks of "list, vector or > record". > Note that substituting a character in a string is not the same as > modifying the character. You are substituting a sequence element with > another one and not modifying an element in that case. That I understand. I am substituting, but still one gets a different strin= g nevertheless. =20 > The same is true for the list (1 2 3) for example. Exactly the same > situation as for a string: You can replace the number 2 in a copy with > another one but you can't modify the number 2 in the list. Numbers and > characters are not mutable. This is the difficult part. You have a copy of a list and you can swap elements but not make new ones. So what you share is the address, where element 2 say uses the address of element 3. All this copy-sequence is then quite restrictive in its capabilities. It does not allow much changes. =20 =20 > Michael. >