GNU bug report logs -
#23417
25.1.50; Elisp manual: document gotcha about new objects and quoting
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sun, 1 May 2016 21:11:01 UTC
Severity: minor
Tags: fixed
Found in version 25.1.50
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 23417 in the body.
You can then email your comments to 23417 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#23417
; Package
emacs
.
(Sun, 01 May 2016 21:11:01 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
.
(Sun, 01 May 2016 21:11:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In the Elisp manual, we do, in node `Rearrangement', point out the
gotcha that a quoted list sexp does not necessarily return a new list
(new cons) each time it occurs in code.
However:
1. The gotcha is more general than the nconc context where it is
presented. It is not limited to using a quoted constant list as a
non-last arg to nconc.
2. The gotcha is not limited to quoted constant lists. It applies
to #s also.
3. Please consider presenting the gotcha in general terms, somewhere.
And that place can then be cross-referenced from relevant nodes (e.g.
`Quoting' and `Creating Hash').
4. Please correct misleading text, such as this from `Creating Hash',
so as not to give the impression that you get a new object for each
occurrence of a quoted constant.
You can also create a new hash table using the printed
representation for hash tables.
Here is one example of confusion wrt the gotcha for #s:
http://stackoverflow.com/q/36964728/729907
In GNU Emacs 25.1.50.1 (i686-pc-mingw32)
of 2015-12-10
Repository revision: 6148555ee5a3d0139ae517803718b3e0357933c7
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/Devel/emacs/snapshot/trunk --enable-checking=yes
--enable-check-lisp-object-type --without-compress-install 'CFLAGS=-Og
-ggdb3' LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
-Ic:/Devel/emacs/include''
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23417
; Package
emacs
.
(Sun, 28 Jul 2019 15:05:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 23417 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> In the Elisp manual, we do, in node `Rearrangement', point out the
> gotcha that a quoted list sexp does not necessarily return a new list
> (new cons) each time it occurs in code.
>
> However:
>
> 1. The gotcha is more general than the nconc context where it is
> presented. It is not limited to using a quoted constant list as a
> non-last arg to nconc.
>
> 2. The gotcha is not limited to quoted constant lists. It applies
> to #s also.
The test case is this:
(defun foo ()
#s(hash-table test eql))
(eq (foo) (foo))
=> t
> 3. Please consider presenting the gotcha in general terms, somewhere.
> And that place can then be cross-referenced from relevant nodes (e.g.
> `Quoting' and `Creating Hash').
I thought we already specified (somewhere in the manual) that a quoted
list often doesn't give us a new list, but after looking around for
seven seconds, I can't find it. What section would this info go in?
> 4. Please correct misleading text, such as this from `Creating Hash',
> so as not to give the impression that you get a new object for each
> occurrence of a quoted constant.
>
> You can also create a new hash table using the printed
> representation for hash tables.
>
> Here is one example of confusion wrt the gotcha for #s:
> http://stackoverflow.com/q/36964728/729907
Yes, that seems pretty misleading -- the natural interpretation of that
(and the example) is that you can use it exactly as is done in that code
snippet. Which you can't. Does anybody want to rephrase the "Creating
Hash" node in hash.texi?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23417
; Package
emacs
.
(Sun, 07 Feb 2021 13:49:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 23417 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> I thought we already specified (somewhere in the manual) that a quoted
> list often doesn't give us a new list, but after looking around for
> seven seconds, I can't find it. What section would this info go in?
This is in Self-Evaluating Forms (now).
>> 4. Please correct misleading text, such as this from `Creating Hash',
>> so as not to give the impression that you get a new object for each
>> occurrence of a quoted constant.
>>
>> You can also create a new hash table using the printed
>> representation for hash tables.
>>
>> Here is one example of confusion wrt the gotcha for #s:
>> http://stackoverflow.com/q/36964728/729907
>
> Yes, that seems pretty misleading -- the natural interpretation of that
> (and the example) is that you can use it exactly as is done in that code
> snippet. Which you can't. Does anybody want to rephrase the "Creating
> Hash" node in hash.texi?
I've now clarified this in Emacs 28.
--
(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, 07 Feb 2021 13:49:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
23417 <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, 07 Feb 2021 13:49:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 08 Mar 2021 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.