From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#34842: 26.1; Alist documentation: let-alist Date: Wed, 13 Mar 2019 08:16:28 -0700 (PDT) Message-ID: <3c296021-c231-4c62-b8e3-0e870cb224cc@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="224840"; mail-complaints-to="usenet@blaine.gmane.org" To: =?UTF-8?Q?Sebasti=C3=A1n_?= =?UTF-8?Q?Mon=C3=ADa?= , 34842@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 13 16:17:24 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h45dE-000wFC-LR for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Mar 2019 16:17:24 +0100 Original-Received: from localhost ([127.0.0.1]:46316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h45dD-000249-Ie for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Mar 2019 11:17:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h45cw-00022Y-HZ for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2019 11:17:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h45cv-0001K9-Kr for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2019 11:17:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56931) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h45cs-0001Il-AT for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2019 11:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h45cr-0002t0-Vu for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2019 11:17: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: Wed, 13 Mar 2019 15:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34842 X-GNU-PR-Package: emacs Original-Received: via spool by 34842-submit@debbugs.gnu.org id=B34842.155249019911057 (code B ref 34842); Wed, 13 Mar 2019 15:17:01 +0000 Original-Received: (at 34842) by debbugs.gnu.org; 13 Mar 2019 15:16:39 +0000 Original-Received: from localhost ([127.0.0.1]:42242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h45cU-0002sG-BX for submit@debbugs.gnu.org; Wed, 13 Mar 2019 11:16:38 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:37682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h45cS-0002s2-B9 for 34842@debbugs.gnu.org; Wed, 13 Mar 2019 11:16:36 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2DF9BiM003342; Wed, 13 Mar 2019 15:16:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=ZcuIKLUJ8+q8vveBuf5SK+rVwRYeEAt5df4o8BaZWhY=; b=PEs3ZeEYMJVkiXaXDQqTJBfFWtt8fcNjW7jSHz+2kDVEUf2imppArfzj3tBwEdjaIqDU 1F22N0a/KAAEcHYzHeqCEK8hSXqTw97p/SCItjhvcfWvQGju4iB4qshg4mZ6JmUnb14c 3WtrqzYtxC1BAIox3cHFSaESPWETyrEKN8LSLQSRLk1e0AbGxY7lIUJrCiLBoZQ50AZK lTVCQwG+xxC7HjqWG1Ld9gfzFzKj1iB1r6ydIFeQ1TmgznD86Ts9IizwOxScO2S9VtbD HSN4YJGKutKQtxg3tS0ppVDKImDW7jD3MfMW/NNcXN0JZ7rZyUmK+RX3UqG1OOR/Zor6 6w== Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2r464rkjew-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Mar 2019 15:16:30 +0000 Original-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 x2DFGTrm013523 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Mar 2019 15:16:29 GMT Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x2DFGS8S015160; Wed, 13 Mar 2019 15:16:29 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4822.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9194 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903130109 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156293 Archived-At: > In [(elisp)`Association Lists']=C2=A0we should add some > documentation about [macro `let-alist']. Below a > suggestion. 1. I agree that it might be good to document this macro in node `Association Lists'. 2. But the example suggested is much less clear than the example in the doc string. 3. The example in the doc string is itself not correct. Instead of "essentially" it should just show the actual macroexpansion. And it should use a different variable name than `alist'. E.g.: (let-alist my-alist (if (and .title .body) .body .site .site.contents)) expands to: (let ((alist my-alist)) (let ((\.title (cdr (assq 'title alist))) (\.body (cdr (assq 'body alist))) (\.site (cdr (assq 'site alist))) (\.site\.contents (cdr (assq 'contents (cdr (assq 'site alist)))))) (if (and \.title \.body) \.body \.site \.site\.contents))) (And yes, the backslashes are necessary.) 4. The last paragraph of the doc string is unclear. What does "access alists inside the original alist" mean? How is anything it tries to describe "displayed in the example above", which has NO nesting of `let-alist'? Whatever it might be trying to say, if the point of the last paragraph is important, then perhaps an example of such nesting is called for, pointing out what is meant. Perhaps such a paragraph and example don't need to be in both the doc string and the manual (dunno how important this is, not knowing what it's really trying to say). 5. The doc (manual and doc string) should explicitly say that `assq' is used, not `assoc'. It should not just hand-wave about this, saying "search is done". And it should say what it means by "this search is done at compile time" - what the consequences of this are.