GNU bug report logs - #46523
cl-struct-sequence-type documentation is incorrect

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Michael <sp1ff@HIDDEN>; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 28.2, send any further explanations to 46523 <at> debbugs.gnu.org and Michael <sp1ff@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 46523 <at> debbugs.gnu.org:


Received: (at 46523) by debbugs.gnu.org; 17 Jun 2022 14:48:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 17 10:48:44 2022
Received: from localhost ([127.0.0.1]:46581 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o2DHA-0007tl-JJ
	for submit <at> debbugs.gnu.org; Fri, 17 Jun 2022 10:48:44 -0400
Received: from quimby.gnus.org ([95.216.78.240]:56750)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1o2DH8-0007tX-NC
 for 46523 <at> debbugs.gnu.org; Fri, 17 Jun 2022 10:48:43 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 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=zxOpiDq5j9KFsGxv1siQxAfHZSOGLtlDErinhZw//XY=; b=RuPaLBWh72HWNGV5XES57w7PUV
 M556WHrpxOVDqjHKRhJRYJ/+bHxf1noS0NZ4wTiFD81BIy84o8pJL5st+cf7AObmKQCaWwAvQJFep
 8gSpeAm+r+CYimTmAIg29nlvlyKlWrFQ3Em08f3r9KaSt91ilzh2WL+66dcwaWHVYtvA=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1o2DGv-00049Z-E2; Fri, 17 Jun 2022 16:48:31 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#46523: cl-struct-sequence-type documentation is incorrect
References: <87y2fqateb.fsf@HIDDEN>
 <CADwFkmnSuD6OPzUK7tKGwhZbMoTxtRyjABPqbsDSF1+S1=fXMw@HIDDEN>
 <jwvh7e5svfo.fsf-monnier+emacs@HIDDEN>
X-Now-Playing: Fairport Convention's _Come All Ye (2)_: "Bonny Bunch Of Roses"
Date: Fri, 17 Jun 2022 16:48:27 +0200
In-Reply-To: <jwvh7e5svfo.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Mon, 27 Sep 2021 14:52:29 -0400")
Message-ID: <87mteb73d0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Stefan Monnier <monnier@HIDDEN> writes: >> Does
 anyone who knows more about this have an opinion here? > > Returning nil
 sounds
 fine to me, So I've now updated the doc string here on the emacs-28 branch.
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 46523
Cc: Stefan Kangas <stefan@HIDDEN>, 46523 <at> debbugs.gnu.org,
 Michael <sp1ff@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Monnier <monnier@HIDDEN> writes:

>> Does anyone who knows more about this have an opinion here?
>
> Returning nil sounds fine to me,

So I've now updated the doc string here on the emacs-28 branch.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46523; Package emacs. Full text available.

Message received at 46523 <at> debbugs.gnu.org:


Received: (at 46523) by debbugs.gnu.org; 27 Sep 2021 18:53:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 14:53:20 2021
Received: from localhost ([127.0.0.1]:42873 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUvkd-0001Gx-Sw
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 14:53:20 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46410)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1mUvkY-0001Gg-LY
 for 46523 <at> debbugs.gnu.org; Mon, 27 Sep 2021 14:53:18 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9BB8F10021B;
 Mon, 27 Sep 2021 14:53:08 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5235C100134;
 Mon, 27 Sep 2021 14:53:07 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1632768787;
 bh=z0jSf6e9eeFyfuARBUf3o8u2++0XxcXc52LuYYGC8HM=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=YImAdZxPDkIbuHfr+5m+T/Vxh246r4cA9pe0xWLqQFjIyPOZtXjs3SbELK5sZu3AE
 VRJH/uPLbhtxTigm2wHvIXmIW1vyt81+b2TNVoB4rhrldXzdDfyy4A19iH+Z2n1RRN
 +cwLk7Xkm/ipt7HiSuiTNy59pNap7cO7+g9eTER4T2U7qdIcAzJ4wAiRLsp0bsiYsf
 hXr7wmRSMMOlMExIpfhGhnczUD9g89m2vFwRpdjUF5mOqLGaqIX79nvwtAJNyT2yoD
 o9BrbIre9WovI3TgwAQJFIULW7Xq3O/IyArhw5VK+nDSjNcHkeNl4/EOY+Z4ZI3bat
 HMOtzNo0sLLYQ==
Received: from alfajor (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 43D60120341;
 Mon, 27 Sep 2021 14:53:07 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#46523: cl-struct-sequence-type documentation is incorrect
Message-ID: <jwvh7e5svfo.fsf-monnier+emacs@HIDDEN>
References: <87y2fqateb.fsf@HIDDEN>
 <CADwFkmnSuD6OPzUK7tKGwhZbMoTxtRyjABPqbsDSF1+S1=fXMw@HIDDEN>
Date: Mon, 27 Sep 2021 14:52:29 -0400
In-Reply-To: <CADwFkmnSuD6OPzUK7tKGwhZbMoTxtRyjABPqbsDSF1+S1=fXMw@HIDDEN>
 (Stefan Kangas's message of "Sat, 25 Sep 2021 08:25:16 -0700")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.144 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 46523
Cc: 46523 <at> debbugs.gnu.org, Michael <sp1ff@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Does anyone who knows more about this have an opinion here?

Returning nil sounds fine to me,


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46523; Package emacs. Full text available.

Message received at 46523 <at> debbugs.gnu.org:


Received: (at 46523) by debbugs.gnu.org; 25 Sep 2021 15:25:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 25 11:25:24 2021
Received: from localhost ([127.0.0.1]:34351 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mU9YK-0003eM-9z
	for submit <at> debbugs.gnu.org; Sat, 25 Sep 2021 11:25:24 -0400
Received: from mail-pg1-f182.google.com ([209.85.215.182]:46063)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1mU9YI-0003e7-Us
 for 46523 <at> debbugs.gnu.org; Sat, 25 Sep 2021 11:25:23 -0400
Received: by mail-pg1-f182.google.com with SMTP id n18so12918470pgm.12
 for <46523 <at> debbugs.gnu.org>; Sat, 25 Sep 2021 08:25:22 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:in-reply-to:references:user-agent
 :mime-version:date:message-id:subject:to:cc;
 bh=SRYjkygQ6aAxwMhFz21698hVpUV72KWX3+BphhDuzpA=;
 b=mOWIcK6Rgo/NPPkTP1jmKPmiarPh3r6P1veDKs5q7GZNQhf8l5Nj72uZIStzoe9U8g
 ZbZYr4YT9MrBTknMoTsXv65ve+VGnh0oPaMbDf1jeq5AUlbfUtyIL/nQN/XTj+gFYRSS
 P7T1wmn7ueI8efKFiNErFsQbvm1Cbn7l9euEbXqg5WTF0DCBBtTu4T048nOgj243SbrQ
 UeS7pCCzIEZ1aB0iPqgHOa1Yj1LMOdtvELr+rzLDfJDOWb55Ap2inbGrt2lU6sFKlkoX
 OTR2zKsw2p0UMEGQrOCO0WuvSIZztusS6rI5WXWwCkO0/lFO+bohBBf548Vh2hVZIhNS
 3TIg==
X-Gm-Message-State: AOAM530zKzpozzQNnBKDAhw1CwJhgb/oJN9hQNwCcvXxDS+VDan+9t6J
 l16L9zBXK2ZX/7XASopnZF57ZZkDEn0E4TbxFBFps8wE
X-Google-Smtp-Source: ABdhPJxOZS2Yjn1srTbusDa8NpzMxjQlJ7VKjgaq339pGUWwJj2O+ElfGTADa5PoIS6jxevzK55oVomYHYR8hr4sA3A=
X-Received: by 2002:a63:f946:: with SMTP id q6mr8697818pgk.42.1632583517303;
 Sat, 25 Sep 2021 08:25:17 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 25 Sep 2021 08:25:16 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <87y2fqateb.fsf@HIDDEN> (Michael's message of "Sun, 14 Feb
 2021 19:42:36 -0800")
References: <87y2fqateb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Date: Sat, 25 Sep 2021 08:25:16 -0700
Message-ID: <CADwFkmnSuD6OPzUK7tKGwhZbMoTxtRyjABPqbsDSF1+S1=fXMw@HIDDEN>
Subject: Re: bug#46523: cl-struct-sequence-type documentation is incorrect
To: Michael <sp1ff@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 46523
Cc: 46523 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Michael <sp1ff@HIDDEN> writes:

> Package: cl-macs
> Version: 2.02
>
> `cl-struct-sequence-type' states that it will "Return `record',
> `vector`, or `list' if STRUCT-TYPE is a struct type, nil
> otherwise." This is incorrect: it will return `vector' or `list'
> if the argument was declared with those types, but if the struct
> type was defaulted to `record' it will return nil. If the
> argument is not a struct type the function errors.
>
> This is due to the fact that `cl-struct-define' has the following
> clause:
>
>    (if (eq type 'record)
>        ;; Defstruct using record objects.
>        (setq type nil))
>
> before `type' is passed to `cl--struct-new-class'
> (cf. cl-preloaded.el).
>
> I'm happy to submit a PR updating the docstring for
> `cl-struct-sequence-type', but wanted to verify that this is the
> desired behavior first (i.e. returning nil if the type is `record').

Does anyone who knows more about this have an opinion here?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46523; Package emacs. Full text available.
Severity set to 'minor' from 'normal' Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug No longer marked as found in versions 2.02. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug reassigned from package 'cl-macs' to 'emacs'. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Feb 2021 04:36:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 14 23:36:06 2021
Received: from localhost ([127.0.0.1]:37108 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lBVcC-0005PR-N8
	for submit <at> debbugs.gnu.org; Sun, 14 Feb 2021 23:36:06 -0500
Received: from aibo.runbox.com ([91.220.196.211]:58252)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sp1ff@HIDDEN>) id 1lBUma-00046i-Ux
 for submit <at> debbugs.gnu.org; Sun, 14 Feb 2021 22:42:45 -0500
Received: from [10.9.9.74] (helo=submission03.runbox)
 by mailtransmit03.runbox with esmtp (Exim 4.86_2)
 (envelope-from <sp1ff@HIDDEN>) id 1lBUmZ-0001XF-KM
 for submit <at> debbugs.gnu.org; Mon, 15 Feb 2021 04:42:43 +0100
Received: by submission03.runbox with esmtpsa [Authenticated alias (942723)]
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 id 1lBUmV-0006X6-RI
 for submit <at> debbugs.gnu.org; Mon, 15 Feb 2021 04:42:40 +0100
User-agent: mu4e 1.2.0; emacs 28.0.50
From: Michael <sp1ff@HIDDEN>
To: submit <at> debbugs.gnu.org
Subject: cl-struct-sequence-type documentation is incorrect
Date: Sun, 14 Feb 2021 19:42:36 -0800
Message-ID: <87y2fqateb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
X-Spam-Score: -0.1 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 14 Feb 2021 23:36:03 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.1 (-)

Package: cl-macs
Version: 2.02

`cl-struct-sequence-type' states that it will "Return `record',
`vector`, or `list' if STRUCT-TYPE is a struct type, nil
otherwise." This is incorrect: it will return `vector' or `list'
if the argument was declared with those types, but if the struct
type was defaulted to `record' it will return nil. If the
argument is not a struct type the function errors.

This is due to the fact that `cl-struct-define' has the following
clause:

    (if (eq type 'record)
        ;; Defstruct using record objects.
        (setq type nil))

before `type' is passed to `cl--struct-new-class'
(cf. cl-preloaded.el).

I'm happy to submit a PR updating the docstring for
`cl-struct-sequence-type', but wanted to verify that this is the
desired behavior first (i.e. returning nil if the type is 
`record').

--
Michael <sp1ff@HIDDEN>




Acknowledgement sent to Michael <sp1ff@HIDDEN>:
New bug report received and forwarded. Copy sent to help-debbugs@HIDDEN. Full text available.
Report forwarded to help-debbugs@HIDDEN:
bug#46523; Package cl-macs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 17 Jun 2022 15:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.