GNU bug report logs - #30070
27.0.50; cl-print sometimes prints self-referencing objects as #1=#<thing>

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Wed, 10 Jan 2018 19:40:01 UTC

Severity: minor

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 30070 <at> debbugs.gnu.org
Subject: bug#30070: 27.0.50; cl-print sometimes prints self-referencing objects as #1=#<thing>
Date: Thu, 11 Jan 2018 15:45:26 +0100
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

> > That gives me "#1=#<thing>".  That's weird because the printed
> > representation of the thing doesn't refer to itself.
>
> Yes, it's a known misfeature (to me at least).  I don't know how we
> could fix it, tho: the cycle-detection is done in a preprocessing phase
> which doesn't know about any print format (nor about cl-print), so by
> the time we learn the the object will be printed as "#<thing>", we have
> already printed "#1=".
>
> To fix it, I have the impression that we'd have to make cl-print a lot
> more complex, and potentially its API as well (e.g. add a matching
> cl-preprocess method additionally to cl-print-object).

Yes, that's what I expected.

Would it make sense to cache what is being printed, post-process it, and
print it at once?


Michael.




This bug report was last modified 7 years and 158 days ago.

Previous Next


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