From: npostavs@users.sourceforge.net
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 27776@debbugs.gnu.org, Philipp Stephani <p.stephani2@gmail.com>
Subject: bug#27776: 26.0.50; `print-gensym' doesn't work as advertised
Date: Thu, 20 Jul 2017 22:21:23 -0400 [thread overview]
Message-ID: <87o9sea5ss.fsf@users.sourceforge.net> (raw)
In-Reply-To: <87eftaegg1.fsf@drachen> (Michael Heerdegen's message of "Fri, 21 Jul 2017 03:17:50 +0200")
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Philipp Stephani <p.stephani2@gmail.com> writes:
>
>> The docstring of `print-gensym' says:
>>
>> When the uninterned symbol appears within a recursive data structure,
>> and the symbol appears more than once, in addition use the #N# and #N=
>> constructs as needed, so that multiple references to the same symbol are
>> shared once again when the text is read back.
>>
>> OK, so you could read this as "the numbering is only used for
>> recursive data structures". But I don't understand why; it seems
>> equally appropriate for non-recursive data structures.
>
> AFAICT...I think the docstring of `print-gensym' just fails to say that
> you get that behavior only with print-circle bound non-nil.
I agree. Compare this note in cltl[1]
Implementation note: Because the #: syntax does not intern the
following symbol, it is necessary to use circular-list syntax if
*print-circle* is not nil and the same uninterned symbol appears
several times in an expression to be printed. For example, the
result of
(let ((x (make-symbol "FOO"))) (list x x))
would be printed as
(#:foo #:foo)
if *print-circle* were nil, but as
(#1=#:foo #1#)
if *print-circle* were not nil.
[1]: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node193.html
next prev parent reply other threads:[~2017-07-21 2:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 21:30 bug#27776: 26.0.50; `print-gensym' doesn't work as advertised Philipp
2017-07-20 21:46 ` Philipp Stephani
2017-07-21 1:17 ` Michael Heerdegen
2017-07-21 2:21 ` npostavs [this message]
2018-01-31 3:39 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o9sea5ss.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=27776@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
--cc=p.stephani2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.