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

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jul 16 20:09:29 EDT 2002

At Tue, 16 Jul 2002 09:51:47 -0400 (EDT), Douglas Troeger wrote:
> 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))
> 
> resulting from
> 
>   (define s1 '((a b) (c a b) (d)))
> 
>   (define s2 '((a b c d e) (f)))
> 
>   (map (lambda (x) (append s1 x)) s2)

That's a bug. Looks like I introduced it sometime in the last six
months. (The function that checks for cycles before printing a value
was finding cycles where they don't exist.)

This is fixed for the next release.

Meanwhile, you can avoid the bug by using DrScheme's printer within
MzScheme:

 > (require (lib "pretty.ss"))
 > (current-print pretty-print-handler)
 > '((#0=(a b) #1=(c a b) #2=(d) a b c d e) (#0# #1# #2# f))
 (((a b) (c a b) (d) a b c d e) ((a b) (c a b) (d) f))


Matthew




Posted on the users mailing list.