From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51412: 29.0.50; cl--mapcar-many fails inconsistently in the presence of circular lists; other shortcomings Date: Wed, 14 Sep 2022 20:38:45 +0200 Message-ID: <87leql3ioa.fsf@gnus.org> References: <87ee88dmzb.fsf@gmail.com> 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="33219"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51412@debbugs.gnu.org, Stefan Monnier To: akater Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 14 20:41:21 2022 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 1oYXK5-0008Td-FY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 20:41:21 +0200 Original-Received: from localhost ([::1]:50228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYXK4-0001aa-FK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 14:41:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYXHq-00082f-W4 for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 14:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39296) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYXHq-0006d7-Jy for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 14:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYXHq-0006ns-DT for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 14:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 18:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51412 X-GNU-PR-Package: emacs Original-Received: via spool by 51412-submit@debbugs.gnu.org id=B51412.166318073926142 (code B ref 51412); Wed, 14 Sep 2022 18:39:02 +0000 Original-Received: (at 51412) by debbugs.gnu.org; 14 Sep 2022 18:38:59 +0000 Original-Received: from localhost ([127.0.0.1]:56228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYXHn-0006na-9n for submit@debbugs.gnu.org; Wed, 14 Sep 2022 14:38:59 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:52874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYXHm-0006nN-3j for 51412@debbugs.gnu.org; Wed, 14 Sep 2022 14:38:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+lPJPWs0uHv0GpbpTCg1Uicw+u4BC7ulVKt/J6c7h6o=; b=PeioOPLcKurqeCOZtC97kw1BhN tuZTAkthEH7zqLpJu6yJ+DS0wa/DWnZq2757MsHP3q9mMHQHGnbaatQcd4w7vY3wVhrMI7ln4hsng 2ZVzOi1Ep0gpERjXwfawbxwFyD80zwG+lh7s8LBaopkfj7NnCi2tndK2VmuxqRiCzwLw=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYXHc-0001VC-33; Wed, 14 Sep 2022 20:38:50 +0200 In-Reply-To: <87ee88dmzb.fsf@gmail.com> (akater's message of "Tue, 26 Oct 2021 11:50:00 +0000") X-Now-Playing: Scout Niblett's _Uptown Top Ranking_: "Dare!" 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:242520 Archived-At: akater writes: > cl--mapcar-many is used as a backend for implementing several cl- > functions in cl-extra. To deal with arbitrary number of arguments > (passed to cl--mapcar-many as list cl-seq), it goes through them all > whenever there are more than 2, in advance, and attempts to compute the > minimal length. > > This fails if any of the arguments is a circular list. > > To reproduce, just evaluate (cl-map 'list #'identity '#1=3D(a . #1#) nil = nil). Debugger entered--Lisp error: (circular-list (a . #2)) > Note that (cl-map 'list #'identity '#1=3D(a . #1#) nil) doesn't fail so > this is at the very least inconsistent. N.B.: CL spec says =E2=80=9CShou= ld be > prepared to signal an error=E2=80=9D for improper lists for such function= s. > Long story short, this means circular lists can be supported by CL > implementations according to CL spec. It's inconsistent, so that should probably be fixed. But isn't signalling an error here the right thing to do? But I guess as long as not all the lists are circular, then it's fine to return something here... Perhaps Stafan has some comments; added to the CCs.