From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ruijie Yu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62037: (proper-list-p '#1=(a #1#)) => 2. It should return nil. Date: Fri, 31 Mar 2023 15:29:13 +0800 Message-ID: References: <873562jylh.fsf@posteo.net> <87y1nuw4p3.fsf@posteo.net> <87ilehpelj.fsf@posteo.net> Reply-To: Ruijie Yu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12849"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.14; emacs 30.0.50 Cc: Alan Mackenzie , 62037@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 31 09:46:22 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 1pi9So-0003Cs-6n for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Mar 2023 09:46:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pi9SW-0004ZK-3p; Fri, 31 Mar 2023 03:46:04 -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 1pi9SU-0004W5-Pv for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2023 03:46:02 -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 1pi9SU-00088Y-Hw for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2023 03:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pi9SU-0004pr-5m for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2023 03:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ruijie Yu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Mar 2023 07:46: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.168024872718541 (code B ref 62037); Fri, 31 Mar 2023 07:46:02 +0000 Original-Received: (at 62037) by debbugs.gnu.org; 31 Mar 2023 07:45:27 +0000 Original-Received: from localhost ([127.0.0.1]:60284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pi9Ru-0004oz-UX for submit@debbugs.gnu.org; Fri, 31 Mar 2023 03:45:27 -0400 Original-Received: from netyu.xyz ([152.44.41.246]:53138 helo=mail.netyu.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pi9Rt-0004oq-BS for 62037@debbugs.gnu.org; Fri, 31 Mar 2023 03:45:25 -0400 Original-Received: from fw.net.yu.netyu.xyz ( [27.18.235.88]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 8375fc1c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 31 Mar 2023 07:45:23 +0000 (UTC) In-reply-to: <87ilehpelj.fsf@posteo.net> 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:258980 Archived-At: Philip Kaludercic writes: >> 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. I agree. However, I would reorganize it slightly to make "cdr being nil" stand out more. See this snippet for `proper-list-p' docstring, and note that I explicitly mentioned circular _list_ to avoid confusion. --8<---------------cut here---------------start------------->8--- - A proper list is neither circular nor dotted (i.e., its last cdr is nil). + A proper list is a list whose last cdr is nil (i.e., neither a circular list nor dotted list). --8<---------------cut here---------------end--------------->8--- Again, I find it problematic that there are two related definitions of "circular", and the first search result for "circular" under Elisp info manual is (info "(elisp) Circular Objects"), which is not what is intended for `proper-list-p'. This causes problems in understanding the intended behavior of this function, manifested via this bug. -- Best, RY