GNU bug report logs - #44330
26.3; doc string of `cl-some'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 30 Oct 2020 15:55:01 UTC

Severity: minor

Tags: fixed

Found in version 26.3

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44330 in the body.
You can then email your comments to 44330 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#44330; Package emacs. (Fri, 30 Oct 2020 15:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 30 Oct 2020 15:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; doc string of `cl-some'
Date: Fri, 30 Oct 2020 08:54:12 -0700 (PDT)
"Return true if PREDICATE is true of any element of SEQ or SEQs.
If so, return the true (non-nil) value returned by PREDICATE."
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^

The second sentence is meaningless/underspecified.  If the function
stops as soon as it finds the first element for which PREDICATE is
true then the doc should say that it returns the value returned by
PREDICATE _for that element_.

Without specifying, in some way, for which element the application of
PREDICATE returns non-nil, "the value returned by PREDICATE" has no
meaning.

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.18362
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44330; Package emacs. (Sun, 01 Nov 2020 12:57:01 GMT) Full text and rfc822 format available.

Message #8 received at 44330 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 44330 <at> debbugs.gnu.org
Subject: Re: bug#44330: 26.3; doc string of `cl-some'
Date: Sun, 01 Nov 2020 13:56:24 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

> "Return true if PREDICATE is true of any element of SEQ or SEQs.
> If so, return the true (non-nil) value returned by PREDICATE."
>                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> The second sentence is meaningless/underspecified.  If the function
> stops as soon as it finds the first element for which PREDICATE is
> true then the doc should say that it returns the value returned by
> PREDICATE _for that element_.
>
> Without specifying, in some way, for which element the application of
> PREDICATE returns non-nil, "the value returned by PREDICATE" has no
> meaning.

I've now clarified the doc string here in Emacs 28.

However, the function is not guaranteed to stop at the first non-nil
predicate value, so that's not specified.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 01 Nov 2020 12:57:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 44330 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 01 Nov 2020 12:57:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44330; Package emacs. (Sun, 01 Nov 2020 17:18:02 GMT) Full text and rfc822 format available.

Message #15 received at 44330 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44330 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#44330: 26.3; doc string of `cl-some'
Date: Sun, 01 Nov 2020 17:17:25 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I've now clarified the doc string here in Emacs 28.

Why not backport it to emacs-27?

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44330; Package emacs. (Sun, 01 Nov 2020 17:46:01 GMT) Full text and rfc822 format available.

Message #18 received at 44330 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44330 <at> debbugs.gnu.org
Subject: RE: bug#44330: 26.3; doc string of `cl-some'
Date: Sun, 1 Nov 2020 09:45:50 -0800 (PST)
> > "Return true if PREDICATE is true of any element of SEQ or SEQs.
> > If so, return the true (non-nil) value returned by PREDICATE."
> >                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > The second sentence is meaningless/underspecified.  If the function
> > stops as soon as it finds the first element for which PREDICATE is
> > true then the doc should say that it returns the value returned by
> > PREDICATE _for that element_.
> >
> > Without specifying, in some way, for which element the application of
> > PREDICATE returns non-nil, "the value returned by PREDICATE" has no
> > meaning.
> 
> I've now clarified the doc string here in Emacs 28.
> 
> However, the function is not guaranteed to stop at the first non-nil
> predicate value, so that's not specified.

According to the definition of Common Lisp, it is
ABSOLUTELY guaranteed to do just that.

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node143.html

  `some' returns as soon as any invocation of predicate
  returns a non-nil value; some returns that value.
  If the end of a sequence is reached, some returns nil.
  Thus, considered as a predicate, it is true if some
  invocation of predicate is true.

And read more on that page - more about this guarantee,
and more about it applying to ALL of the functions some,
every, notany, and notevery. 

Is this a bug with the implementation of `cl-some'?
Or is it a doc bug?

Does Emacs `cl-some' pretend to respect the CL
definition of `some'?  If not, the doc should say
that explicitly, and it should spell out just how
it deviates from support of the standard.

(So far, this bug has, in effect, been declared
"won't fix".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44330; Package emacs. (Mon, 02 Nov 2020 15:13:01 GMT) Full text and rfc822 format available.

Message #21 received at 44330 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 44330 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#44330: 26.3; doc string of `cl-some'
Date: Mon, 02 Nov 2020 16:11:50 +0100
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> I've now clarified the doc string here in Emacs 28.
>
> Why not backport it to emacs-27?

It didn't really seem vital (to put it mildly).

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 01 Dec 2020 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 203 days ago.

Previous Next


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