[plt-scheme] possible display issues: mzscheme and emacs

From: Pierpaolo BERNARDI (bernardp at cli.di.unipi.it)
Date: Tue Jul 16 21:19:05 EDT 2002

> Are there known issues with displaying lists from mzscheme-200 under
> emacs?  I am (for example) seeing displays such as
> 
> ((#0=(a b) #1=(c a b) #2=(d) a b c d e) (#0# #1# #2# f))
> 
> instead of the expected
> 
> (((a b) (c a b) (d) a b c d e) ((a b) (c a b) (d) f))

The output you get is a special syntax for printing values
maintaining information about shared subexpressions.
This syntax is activated by requesting it with (print-graph #t),
or it is activated automatically when the printer detects a 
cycle in the structure being printed.

See the MzScheme manual section 14.5  Data Sharing 
in Input and Output for a full explanation.

However, in my understanding of the thing, it seems that 
there is a bug in MzScheme: the structure you print in 
your example does not contain cycles and so it shouldn't 
trigger print-graph.

The following is an even simpler test case:

> (let ((x '(a b c)))
    (list x x x x x x x))
(#0=(a b c) #0# #0# #0# #0# #0# #0#)


P.




Posted on the users mailing list.