From: uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 64960@debbugs.gnu.org, eliz@gnu.org
Subject: bug#64960: Documentation for copy-sequence
Date: Mon, 31 Jul 2023 06:19:46 +0000 [thread overview]
Message-ID: <p6BMxNa5AB74H50Zy7MhC6X1e1-aJQ1zMp8BGrbWQsCRqtNhzvAbWqCzQeeTE1fl8yaKoNKkUVj753LGCbbBM2t4vwk1gjQo3akfR2S_Oao=@proton.me> (raw)
In-Reply-To: <877cqgwt4q.fsf@web.de>
------- Original Message -------
On Monday, July 31st, 2023 at 5:24 PM, Michael Heerdegen <michael_heerdegen@web.de> wrote:
> uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" bug-gnu-emacs@gnu.org writes:
>
> > > > When I modify the copy, the original remains intact.
> > >
> > > No, if you modify an element of the copy, the corresponding element of
> > > the original is also changed. That's what "shared" means.
> >
> > Except for strings
>
>
> 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 string
nevertheless.
> 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.
> Michael.
>
next prev parent reply other threads:[~2023-07-31 6:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-30 16:42 bug#64960: Documentation for copy-sequence uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-30 18:36 ` Eli Zaretskii
2023-07-30 19:20 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-30 19:59 ` Dmitry Gutov
2023-07-30 20:09 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-30 20:15 ` Dmitry Gutov
2023-07-30 20:41 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-31 1:13 ` Drew Adams
2023-07-31 1:22 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-31 1:36 ` Drew Adams
2023-07-31 1:50 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-31 2:21 ` Eli Zaretskii
2023-07-31 2:31 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-31 5:24 ` Michael Heerdegen
2023-07-31 6:19 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-08-01 3:56 ` Michael Heerdegen
2023-08-13 4:27 ` Michael Heerdegen
2023-08-14 10:14 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-14 23:46 ` Michael Heerdegen
2023-08-15 0:43 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-15 23:28 ` Michael Heerdegen
2023-08-16 4:35 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-11 15:55 ` Stefan Kangas
2023-07-31 14:34 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='p6BMxNa5AB74H50Zy7MhC6X1e1-aJQ1zMp8BGrbWQsCRqtNhzvAbWqCzQeeTE1fl8yaKoNKkUVj753LGCbbBM2t4vwk1gjQo3akfR2S_Oao=@proton.me' \
--to=bug-gnu-emacs@gnu.org \
--cc=64960@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=uzibalqa@proton.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.