From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#46750: calc defmath let* behaviour surprising, inconsistent, or wrong Date: Mon, 1 Mar 2021 21:12:44 +0100 Message-ID: References: <43B9DD71-1C8D-43CA-8753-5227BAE91302@acm.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) 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="7633"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46750@debbugs.gnu.org To: Stephan Neuhaus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 01 21:14:09 2021 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 1lGovh-0001uF-L1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 21:14:09 +0100 Original-Received: from localhost ([::1]:33456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGovg-00087Z-Lv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 15:14:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGova-00087E-0x for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 15:14:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39416) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGovZ-0003Dv-Q7 for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 15:14:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lGovZ-0003a5-MX for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 15:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Mar 2021 20:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46750 X-GNU-PR-Package: emacs Original-Received: via spool by 46750-submit@debbugs.gnu.org id=B46750.161462959113691 (code B ref 46750); Mon, 01 Mar 2021 20:14:01 +0000 Original-Received: (at 46750) by debbugs.gnu.org; 1 Mar 2021 20:13:11 +0000 Original-Received: from localhost ([127.0.0.1]:50960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGoul-0003Yk-JL for submit@debbugs.gnu.org; Mon, 01 Mar 2021 15:13:11 -0500 Original-Received: from mail150c50.megamailservers.eu ([91.136.10.160]:55502 helo=mail50c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGoui-0003YY-Nn for 46750@debbugs.gnu.org; Mon, 01 Mar 2021 15:13:09 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1614629587; bh=JIr22C1vXFwWS3lJa5H8jaXgQr4rSbmuf6LtnRZqorY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=iTCrTXnH3zFovW8wwYAy/wHH6YuY0jxWldFQDqgsHpH94fGuGGkWEfdEOWnkePKcm xX4u4FbkTBv9U2388iBzrw9JKKQ2FIHbFBLN4GXRWMeqAjhElw02sVp8mingZ7ugYI C964jejUjrb35T0dRfcRBd/CePGmdjYJRmAfIlkY= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail50c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 121KCjm0028337; Mon, 1 Mar 2021 20:13:06 +0000 In-Reply-To: <43B9DD71-1C8D-43CA-8753-5227BAE91302@acm.org> X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A742F28.603D4AD3.0004, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=UMej4xXy c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=h7-piV34LZSDGSakxNcA:9 a=CjuIK1q_8ugA:10 X-Origin-Country: SE 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" Xref: news.gmane.io gmane.emacs.bugs:201167 Archived-At: > Thank you Stephan, it does indeed look like a bug. Not one but quite a few. Apart from the incorrect variable scoping in = let* that you noticed, the `defmath`-specific forms `for` and `foreach` = had the same problem: even the examples in the manual didn't work. Moreover, `foreach` didn't work at all as specified -- it is supposed to = iterate over list elements but only ran over the list tails. As I was = writing tests, it turned out that the facility to quote functions as a = means to override the substitution of `calcFunc-`-prefixed names didn't = work at all. These have now been fixed on master = (08b11a02f49da5ca0e4e58a32fa853df0c5e0214); please tell me if it helped. = Given the number of flaws discovered in this part of the code, I = wouldn't be surprised if there are more to be found.