From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#64692: Better descriptions of Cons Cells and Dotted Notation with real-life syntax Date: Tue, 18 Jul 2023 17:13:56 +0000 Message-ID: References: <83pm4p7ane.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33719"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "64692-done@debbugs.gnu.org" <64692-done@debbugs.gnu.org> To: Eli Zaretskii , uzibalqa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 18 19:15:29 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 1qLoIK-0008YS-RY for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jul 2023 19:15:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLoHw-0007Gn-9x; Tue, 18 Jul 2023 13:15: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 1qLoHu-0007GO-MD for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 13:15:02 -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 1qLoHu-00035L-DL for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 13:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLoHu-0004ys-8s for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 13:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jul 2023 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64692 X-GNU-PR-Package: emacs Original-Received: via spool by 64692-done@debbugs.gnu.org id=D64692.168970044719068 (code D ref 64692); Tue, 18 Jul 2023 17:15:02 +0000 Original-Received: (at 64692-done) by debbugs.gnu.org; 18 Jul 2023 17:14:07 +0000 Original-Received: from localhost ([127.0.0.1]:54127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLoH0-0004xT-VY for submit@debbugs.gnu.org; Tue, 18 Jul 2023 13:14:07 -0400 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:15118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLoGv-0004wt-8m for 64692-done@debbugs.gnu.org; Tue, 18 Jul 2023 13:14:05 -0400 Original-Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36IGtxgm013137; Tue, 18 Jul 2023 17:14:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=5Ak6YajrmvqbSk23SUSM3V7ZJ4/WLOnYlsUzYE54uIM=; b=wV+AkqOpwaKYHbd+RnqLQ6jGGeVXO8VUaavS0mIolj4JpG/Nux/aaR6RUtA0sBp3Dcte NXaFlfusbNM7YNsIambZOi0rBjsKmPoEDO6eSMFFWbdMEOt77sQ5EDgZP2WHVHuPMTff AMqRmoCpszYsM6t/kqTEs5804Cm2uQV+a1+X+qwLo9gRJsk4e/hFEVzY227qQ0agcWru Qkeg7II2shwaOv2tsIhZi6u6ZPDAnlNjL3Ne0Gj001wExOV4PxXTRYAA6fspNtdoyf3w vJAFXjLnsxvCV7OmtIBLUa0dzzMD1kBF+U28KS+m6C8dSEfuKoiqX99T93E31XrXHfaG Ww== Original-Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3run8a5p58-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Jul 2023 17:14:00 +0000 Original-Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 36IGGpa5017352; Tue, 18 Jul 2023 17:13:59 GMT Original-Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2105.outbound.protection.outlook.com [104.47.70.105]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ruhw5dc1u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Jul 2023 17:13:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OJH60aC2ZvUXnfVlbJMtnEFN2Aq1fwYXCd4BtC/YyDIbzW4MbVvqelT5Bjp/M4n3FDNpI19AAj/ynC4rPhifTZK2sfEsfOLtXmFIR6CTn6yMsxy/D14dh7KIPRVFAaRF15YkoIUEsjHRFbqVjvvi1bhtX3BLt6uOKglDEQAKNpjdMONsut+rKAkhk911guWet1d1stPHOBplqLlet1E46aXRDi1hp4RU2O86UdSAcbXJJEa5kr2vjgxPmyjjhdBN7JgMGK/qSw0Cq9dFKUkNnJl1ot5ibzhIIVTbq8AlI2XKAWMHjPqlW185O+QTqtv1/aYDdM4EH0B1cdLwV/3wRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5Ak6YajrmvqbSk23SUSM3V7ZJ4/WLOnYlsUzYE54uIM=; b=irx9hX7TyqiO4n7YbWbzrRDrxO8bN29pVc8+ar8ErMIF5OJupzS+9xS77edd7sDWDagKnhLGBj94LjS9AT1ue959EdRQYlPTJ42+xdbLC56JHQ8BpzrvR/dFoR7QbRwQ6y19jzcwuohAiBpmcylwT+n440PNZ1qMcvs34ZouzzfQp6AKwDGU1h6Z+RTIn74tyWEHoHF0L8PcSVvFzo2Q8dvQbduJSZvEoEA8y3i3iBE3Eddk0cXwkhKozXdjSHY5IVyJf7gvy/hr42rzIYGIuU54UCz8Iwx5Txf/RGXb9PaVDJb1bI36DpGfRT5S0ai+lTUoy1xw2pr70Wnd2eOtQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5Ak6YajrmvqbSk23SUSM3V7ZJ4/WLOnYlsUzYE54uIM=; b=Cmdj0OTQ4bDATKMM0BeUXpsE5yX0EQQKjTyRVHrReVsLurgR6oK+1zhHTae4NU9OMUlMIPlVtpIIT38BjlIMIzGQpiCbfmUDeu94S9emk1cwODVKbMvqEj5ubWXMf25evDU3VpFdNMzUBO1NDkL4+tubpEPG3eZfDTQulLWOScw= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BLAPR10MB4929.namprd10.prod.outlook.com (2603:10b6:208:324::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.23; Tue, 18 Jul 2023 17:13:56 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::ac9a:8b33:bfbb:d0a8]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::ac9a:8b33:bfbb:d0a8%5]) with mapi id 15.20.6588.031; Tue, 18 Jul 2023 17:13:56 +0000 Thread-Topic: [External] : bug#64692: Better descriptions of Cons Cells and Dotted Notation with real-life syntax Thread-Index: AQHZuWY+Ky9t4KbqIkG+l8pKYpyRAa+/vXqg In-Reply-To: <83pm4p7ane.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|BLAPR10MB4929:EE_ x-ms-office365-filtering-correlation-id: 99f63709-db0c-44c1-bfbf-08db87b25ecd x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6E5pbWV1RkuXERDAHe+HEsxCWBiQzQKrjTyIsz6a/b6x2CvwGyuclsKI0OwewukNnW9XqMucemlnGDDhIW7dksp95z+7dyH5kiwyrQXto9sBVUyIzlbZ99EEDXXTpMoh7FmJaxWNg4VmUU7iU3gU2s7gYnCRok8LbY8xbar8fGQifUfh1qjpb6ZZm9ytRK0mcUtc5Zhd0ttbulIMx13sGSbHKWBqlV3RtFT8n6T6kq9aB7neZjGC38eO+s4axRVxaL7qs2+K5WAtfvrGo/PpgVjdH0Qp0OGJ4x00IvLdtBe38BKs1d5DOG/tPHpc5daSe/qKB+8wuHr+PAFaghM3Zcnwaw3/9daZmdHP7q/dXe9fshxR+W3fuvdDJ+hlYVBNV14MFUQzH7DQzL0zk5V/as4tHe5HdylY1q1WjaBDH5BIp3bCxGLLtfJSNW/w4AYId/MS17YK8FfwRZaDRoR3hKV3qpfd5FEtsrPuPXJHX9myh8C+gGBswZpudKVuRZdGwmKxHBkugBI7vbXeoZrFBDCTqPt+Gs3OEf9GkL9/KlvtjhNflUKMJgOErzv6cJLhh2bwMD0w4PIl3S/tKnP4Dr5NzKGgKIUb4sHtF8BIxI9Q11FhKW6y0D9jNGgnCRCH x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(376002)(39860400002)(396003)(136003)(366004)(346002)(451199021)(2906002)(44832011)(52536014)(8936002)(8676002)(66556008)(64756008)(66476007)(66946007)(4326008)(316002)(41300700001)(5660300002)(66446008)(9686003)(26005)(6506007)(7696005)(186003)(76116006)(478600001)(71200400001)(110136005)(83380400001)(33656002)(38100700002)(122000001)(86362001)(38070700005)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: Or8L8/8MKsYJ+hqO5YiuV/w/6JFEhwlgobxRXQQ9Xv7D1Bsvq/VTHD1bmWsey2yf54BORtITd+8CprBeAKYqr47incK/n/AJO7hzruhbit11+NwlYtjcZBQaafU5a/YYR2xqplVeu3OYacVLBPbwmoGQM1QpWiT+Nxg3DhOcVIyoKW8HHIuDrciUo34UzN8CwpD0X8/SWhFz3X7Ry13iAgfgFs/N77BYbTyMfe3pvtmi6uxsmZfqPxS7TXJGXbIZ4HUQTEAl9syITfpZgev7z52gub7mOBHmrf/43S2zYZJC3u+DBb0d4yMQlSdyurH4Wjnu2NQQwpaxBBov2yRW5mI6VZy7YVhXzgXWg5k2c1uxMh/99ll2tryjbyEx1SZ+sPWtB/9tc26hLFAyb1Ln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x0YlDr753im1u57iX2j++5GyR8ZF69hweSe9H/WHtZsYILLYk59pIO9G8SgoYxwNMDvocyw51NhbEO9ErRb08zwnHTFffMLhFSEEeZJVH3ivhH+mYUSNQj2DiQMifDeP1VmjV6vU0oVV99WM/aRV0ORpdApV4zd7fe15byorILaOzG6Wz0bsuT4uN78dkr1pJBxNV4lJAp0CVp Fb3odREZGMw7vpSMImy15EVlpJaoY27+tDxtQm12PEw7H+UsU0CS6fyyBgfzGIhfr/n5gbBbVjOViarGuV X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99f63709-db0c-44c1-bfbf-08db87b25ecd X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jul 2023 17:13:56.6940 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wRcJ2fXv1xGACUDjyprlObbiYN52W58Uo8PtbM6Rr53k79WyZ+p0whaMkG1lSmVpCNBlFbey8RT6vUMXz6j5LA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB4929 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-18_13,2023-07-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 mlxscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307180157 X-Proofpoint-ORIG-GUID: 8itEva1YPWQw-khn683M2Jn8tjXNXhLS X-Proofpoint-GUID: 8itEva1YPWQw-khn683M2Jn8tjXNXhLS 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:265482 Archived-At: > > Whereas the Emacs > > Lisp Reference Manual isn't designed as a tutorial with explanations, > > the "Introduction to Programming in Emacs Lisp" simply refers to the > > "Emacs Lisp Reference Manual" for understanding Cons Cells and Dotted > > Notation. > > > > This means that the "Introduction to Programming in Emacs Lisp" would > > benefit from some real-life list syntax. Currently I find it short > > and far from real-life. >=20 > The Introduction manual has a node "List diagrammed", to which you > will get if you type "i cons cell RET", which describes that, with > pictures. That node doesn't explain dot notation. It does have a link to the Elisp manual for that. But it doesn't even show an example of dot notation. A reader may well wonder why there's a link for "Dotted Pair Notation". It would be good to show Lisp notation for some of the cons-cell diagrams it presents. It does show that for (violet buttercup). It would do well to say that this is the same as (violet . (buttercup)) and the same as (violet . (buttercup . nil)). IOW, show dot notation as a succinct version of the cons-cell diagrams. And say that the Lisp reader can read this syntax: (violet . (buttercup . nil)) is read the same as is (violet buttercup). This is a useful bit of Lisp knowledge, and it's missing from the intro Elisp manual. Nothing in the intro Elisp manual presents dot notation. The most it says about list notation is that a list of items a, b, and c is written (a b c). The intro Elisp manual _shows_ dot notation in passing in a couple places (e.g., custom entry in init file), but it doesn't explain or even mention the notation at all. It at least points to the existing explanation in the Elisp manual, in its nodes Build a List and Lists diagrammed.=20 But preferably the intro manual would itself introduce the notation briefly. The intro manual goes into the whole cons-cell diagramming thing. It would do well to tie that explanation to the Lisp notation for lists, which includes dot notation and the identity of (a) with (a . nil), and thus the identity of (a b c) with (a . (b . (c . nil))). > So I don't think we have any problems in this area,=20 > and I'm therefore closing this bug. I think this enhancement request should remain open. It could reasonably be on the list of other possible improvements to the intro Elisp manual. A reader of the intro Elisp manual should be exposed to this syntax, IMHO. (a . (b . nil)) is a beautiful depiction of the corresponding cons-cell diagram.