GNU bug report logs -
#72888
Confusing descriptive text
Previous Next
Reported by: 麻枝忠 <maedaqu <at> gmail.com>
Date: Fri, 30 Aug 2024 08:49:03 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.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 72888 in the body.
You can then email your comments to 72888 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72888
; Package
emacs
.
(Fri, 30 Aug 2024 08:49:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
麻枝忠 <maedaqu <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 30 Aug 2024 08:49:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Equality Predicates (GNU Emacs Lisp Reference Manual)
<https://www.gnu.org/software/emacs/manual/html_node/elisp/Equality-Predicates.html>
In the descriptive text of function "equal":
"The equal function recursively compares the contents of objects if they
are integers, strings, markers, vectors, bool-vectors, byte-code function
objects, char-tables, records, or font objects."
Shouldn't "integers" here be "conses" or "lists"?
[Message part 2 (text/html, inline)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 30 Aug 2024 11:01:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
麻枝忠 <maedaqu <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 30 Aug 2024 11:01:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 72888-done <at> debbugs.gnu.org (full text, mbox):
> From: 麻枝忠 <maedaqu <at> gmail.com>
> Date: Fri, 30 Aug 2024 14:58:47 +0800
>
> Equality Predicates (GNU Emacs Lisp Reference Manual)
>
> In the descriptive text of function "equal":
>
> "The equal function recursively compares the contents of objects if they are integers, strings, markers, vectors,
> bool-vectors, byte-code function objects, char-tables, records, or font objects."
>
> Shouldn't "integers" here be "conses" or "lists"?
No (an integer could be a fixnum or a bignum), but lists and conses
should be in that list. I've now added that on the emacs-30 release
branch, and I'm therefore closing this bug. Thanks for pointing out
the omission.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72888
; Package
emacs
.
(Sat, 31 Aug 2024 12:40:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 72888 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thank you for making this text better. It can be made even more accurate: neither integers nor strings or bool-vectors are actually compared recursively in a useful sense so we shouldn't claim that they are, and nowadays both byte-compiled and interpreted closures are compiled but we should note the usual intensionality problems when comparing functions.
Here is a proposed amendment.
[equal-doc.diff (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72888
; Package
emacs
.
(Sat, 31 Aug 2024 13:02:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 72888 <at> debbugs.gnu.org (full text, mbox):
> From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
> Date: Sat, 31 Aug 2024 14:37:26 +0200
> Cc: 麻枝忠 <maedaqu <at> gmail.com>,
> 72888 <at> debbugs.gnu.org
>
> Thank you for making this text better. It can be made even more accurate: neither integers nor strings or bool-vectors are actually compared recursively in a useful sense so we shouldn't claim that they are, and nowadays both byte-compiled and interpreted closures are compiled but we should note the usual intensionality problems when comparing functions.
>
> Here is a proposed amendment.
Doesn't that lose useful information? It only tells what is compared
recursively, but doesn't tell about comparing strings or integers or
bool-vectors by themselves, which is IMO important.
IOW, given your proposed text, how do we explain that
(equal "foo" (substring "foobar" nil -3)) => t
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72888
; Package
emacs
.
(Sat, 31 Aug 2024 14:41:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 72888 <at> debbugs.gnu.org (full text, mbox):
31 aug. 2024 kl. 14.58 skrev Eli Zaretskii <eliz <at> gnu.org>:
> Doesn't that lose useful information? It only tells what is compared
> recursively, but doesn't tell about comparing strings or integers or
> bool-vectors by themselves, which is IMO important.
That's a fair point. What about something like:
The @code{equal} function compares numbers, strings and bool-vectors by
value. Lists, cons cells, vectors, records, markers, char-tables,
font objects, and function objects (closures)@footnote{However, equality
of distinct function objects cannot be guaranteed in general.} are
compared recursively by using @code{equal} on their constituent parts.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72888
; Package
emacs
.
(Sat, 31 Aug 2024 16:09:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 72888 <at> debbugs.gnu.org (full text, mbox):
> From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
> Date: Sat, 31 Aug 2024 16:37:56 +0200
> Cc: maedaqu <at> gmail.com,
> 72888 <at> debbugs.gnu.org
>
> 31 aug. 2024 kl. 14.58 skrev Eli Zaretskii <eliz <at> gnu.org>:
>
> > Doesn't that lose useful information? It only tells what is compared
> > recursively, but doesn't tell about comparing strings or integers or
> > bool-vectors by themselves, which is IMO important.
>
> That's a fair point. What about something like:
>
> The @code{equal} function compares numbers, strings and bool-vectors by
> value. Lists, cons cells, vectors, records, markers, char-tables,
> font objects, and function objects (closures)@footnote{However, equality
> of distinct function objects cannot be guaranteed in general.} are
> compared recursively by using @code{equal} on their constituent parts.
SGTM, thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72888
; Package
emacs
.
(Sat, 31 Aug 2024 16:50:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 72888 <at> debbugs.gnu.org (full text, mbox):
31 aug. 2024 kl. 18.07 skrev Eli Zaretskii <eliz <at> gnu.org>:
> SGTM, thanks.
Thank you, push with minor tweak to emacs-30.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 29 Sep 2024 11:24:16 GMT)
Full text and
rfc822 format available.
This bug report was last modified 320 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.