From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#62037: (proper-list-p '#1=(a #1#)) => 2. It should return nil. Date: Fri, 31 Mar 2023 07:25:12 +0000 Message-ID: <87ilehpelj.fsf@posteo.net> References: <873562jylh.fsf@posteo.net> <87y1nuw4p3.fsf@posteo.net> 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="32716"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , 62037@debbugs.gnu.org To: Ruijie Yu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 31 09:26:19 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 1pi99P-0008Ix-Ds for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Mar 2023 09:26:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pi999-0008IP-Fg; Fri, 31 Mar 2023 03:26:03 -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 1pi999-0008IH-0k for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2023 03:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pi998-0004Yw-Ok for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2023 03:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pi998-0004If-6v for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2023 03:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Mar 2023 07:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62037 X-GNU-PR-Package: emacs Original-Received: via spool by 62037-submit@debbugs.gnu.org id=B62037.168024752216480 (code B ref 62037); Fri, 31 Mar 2023 07:26:02 +0000 Original-Received: (at 62037) by debbugs.gnu.org; 31 Mar 2023 07:25:22 +0000 Original-Received: from localhost ([127.0.0.1]:60223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pi98U-0004Hk-2U for submit@debbugs.gnu.org; Fri, 31 Mar 2023 03:25:22 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:58587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pi98S-0004HU-AA for 62037@debbugs.gnu.org; Fri, 31 Mar 2023 03:25:21 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 5BBD82402C2 for <62037@debbugs.gnu.org>; Fri, 31 Mar 2023 09:25:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680247514; bh=qK7Al0z4QiownTlalf0aIrUktJ/h5bPdf8Z9c3AYv84=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=VB9FhWRfQMYCNkUVqeUmCdt3M7rcjgSo4SpOjX/wwDBLsQuagmui5YDCGpbdBYmQp AX1N0Zbl3aHlVZNylBuL21RUZWOHUs1Ivhbqp7fZbC0Sda6EwvWQjM6Za5ZWHat1xL 1GnmGANWjkiBCNWC0iXb1wW62IN1bgIDExGAQR/0UeLs5zb0AJxPKW5WoRqzCByQk0 AGvbOQ7YzNiUvWrdpCvrXlHAXZLzqhKPKevIyejtypBbO6LEc+xRKJ8R4JQAlL1TkF x6y9esC2flzQiqkFGpkvZzUOXipRGewFqsGDMNpESs2IG3CQiGYcIrpee2gve/SA5+ iX9XB3dxI6Oow== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PnsJ94zKNz9rxM; Fri, 31 Mar 2023 09:25:13 +0200 (CEST) In-Reply-To: (Ruijie Yu's message of "Fri, 31 Mar 2023 12:35:49 +0800") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM 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:258975 Archived-At: Ruijie Yu writes: >>> [...] >>>> Doesn't this point resolve the issue? >>> >>> No, it doesn't. A circular list is defined (Elisp manual page "Lists >>> and Cons Cells") as one where "some cons cell=E2=80=99s CDR could point= to one >>> of the previous cons cells in the list". A proper list (page >>> "List-related Predicates") is one which is neither dotted nor circular. >>> >>> The list #1=3D(a . #1#) is clearly circular. proper-list-p should retu= rn >>> nil for it. >> >> But (proper-list-p '#1=3D(a . #1#)) does return nil? [...] >> >> because #1=3D(a #1#)) is not a circular list, the cadr only has a >> reference back to a the beginning of the list, but #1=3D(a . #1#)) is >> cyclical because as you say a cdr points back to a previous cons cell: >> [...] >> >>> The purpose of proper-list-p is surely to find out in advance whether an >>> algorithm one wishes to run on a list can proceed without taking special >>> precautions for dottedness or circularity. proper-list-p fails here. >> [...] > > So, it all boils down to the fact that the current documentation is > lacking and/or ambiguous, in terms of "the purpose of `proper-list-p'", > as well as the two definitions of the adjective "circular", which are > not interchangeable in different contexts. It might be lacking, but I don't think the explanation is ambiguous. "its last cdr is nil" might not be awfully formal, but it does describe the problem. > If we all agree that only some pieces of documentation need updating, > then I will try to come up with a patch(set) in the upcoming few days -- > or someone else can, should one volunteers to do so. FTR, I am still > waiting for a counter signature from FSF. --=20 Philip Kaludercic