From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 27 16:40:33 2017 Received: (at submit) by debbugs.gnu.org; 27 Sep 2017 20:40:33 +0000 Received: from localhost ([127.0.0.1]:35465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxJ8D-0001lS-HW for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:40:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxJ8A-0001lB-FT for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:40:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxJ81-0003Bp-4H for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:40:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45547) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxJ81-0003Bg-0Y for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:40:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxJ7v-00006z-4M for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:40:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxJ7q-0002vf-Vm for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:40:15 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:17703) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxJ7q-0002ut-Mj for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:40:10 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v8RKe7Zq021752 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 27 Sep 2017 20:40:08 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v8RKe7ZT021897 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 27 Sep 2017 20:40:07 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v8RKe7PY025420 for ; Wed, 27 Sep 2017 20:40:07 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 27 Sep 2017 13:40:06 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 24.5; doc of `copy-sequence' X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6776.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.5 (----) 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: -4.5 (----) This (doc string) is not true for an empty sequence: "Return a copy of a list, vector, string or char-table." This ((elisp) `Sequence Functions') is not true for an empty sequence: Storing a new element into the copy does not affect the original SEQUENCE, and vice versa. However, the elements of the new sequence are not copies; they are identical (eq) to the elements of the original. Therefore, changes made within these elements, as found via the copied sequence, are also visible in the original sequence. This has not been true for an empty string since Emacs 23. It is now the case, for instance that (eq foo bar) here returns t: (setq foo "" bar (copy-sequence foo)) (Before Emacs 23 it returned nil.) Similarly, for []. `copy-sequence' used to give you a new empty-vector object. Now it does not. (However, before those changes the same thing did hold for the empty list, (): copy-sequence did not return a new empty-list object.) The doc should make clear that there is only one empty-sequence object, for each type of sequence. In particular, `copy-sequence' does not create a new sequence object if the sequence is empty. In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D3D/c/usr --host=3D3Di686-pc-mingw32' From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 30 09:04:48 2017 Received: (at 28627-done) by debbugs.gnu.org; 30 Sep 2017 13:04:48 +0000 Received: from localhost ([127.0.0.1]:40131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyHRo-0002gv-Cv for submit@debbugs.gnu.org; Sat, 30 Sep 2017 09:04:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37563) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyHRl-0002gd-DM for 28627-done@debbugs.gnu.org; Sat, 30 Sep 2017 09:04:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyHRd-0002l5-5D for 28627-done@debbugs.gnu.org; Sat, 30 Sep 2017 09:04:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyHRd-0002ky-1k; Sat, 30 Sep 2017 09:04:37 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3232 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dyHRc-0001mt-Ae; Sat, 30 Sep 2017 09:04:36 -0400 Date: Sat, 30 Sep 2017 16:04:31 +0300 Message-Id: <83h8vk49sw.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-reply-to: (message from Drew Adams on Wed, 27 Sep 2017 13:40:06 -0700 (PDT)) Subject: Re: bug#28627: 24.5; doc of `copy-sequence' References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28627-done Cc: 28627-done@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Wed, 27 Sep 2017 13:40:06 -0700 (PDT) > From: Drew Adams > > The doc should make clear that there is only one empty-sequence object, > for each type of sequence. In particular, `copy-sequence' does not > create a new sequence object if the sequence is empty. Thanks. I didn't feel we should guarantee what we have in the current implementation, especially as describing all the details might be tedious (does "vectors" include bool-vector or doesn't it?). So I just added a vague statement that copying an empty object may yield the same object. I think this is enough for Lisp programmers to produce a valid and future-proof code. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 30 09:44:57 2017 Received: (at 28627-done) by debbugs.gnu.org; 30 Sep 2017 13:44:57 +0000 Received: from localhost ([127.0.0.1]:40176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyI4f-0003ey-5B for submit@debbugs.gnu.org; Sat, 30 Sep 2017 09:44:57 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:39476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyI4d-0003em-G7 for 28627-done@debbugs.gnu.org; Sat, 30 Sep 2017 09:44:55 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v8UDinID029821 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 30 Sep 2017 13:44:49 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v8UDim9w027857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 30 Sep 2017 13:44:48 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v8UDimFB027516; Sat, 30 Sep 2017 13:44:48 GMT MIME-Version: 1.0 Message-ID: <22d8099a-7e00-4155-8979-2c42318c0788@default> Date: Sat, 30 Sep 2017 06:44:47 -0700 (PDT) From: Drew Adams To: Eli Zaretskii , Drew Adams Subject: RE: bug#28627: 24.5; doc of `copy-sequence' References: <> <<83h8vk49sw.fsf@gnu.org>> In-Reply-To: <<83h8vk49sw.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4588.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 28627-done Cc: 28627-done@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.8 (-) > > The doc should make clear that there is only one empty-sequence object, > > for each type of sequence. In particular, `copy-sequence' does not > > create a new sequence object if the sequence is empty. >=20 > Thanks. I didn't feel we should guarantee what we have in the current > implementation, especially as describing all the details might be > tedious (does "vectors" include bool-vector or doesn't it?). So I > just added a vague statement that copying an empty object may yield > the same object. I think this is enough for Lisp programmers to > produce a valid and future-proof code. I agree. What is important is to amend or remove the general Statement that it always returns a copy of the sequence. We could (or not) also stipulate that some sequence types have only one empty-sequence object, which is what `copy-sequence' returns for that sequence type. From unknown Fri Aug 15 03:38:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 29 Oct 2017 11: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