bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18012: 24.3; Can't print a huge list structure in IELM


From: npostavs
Subject: bug#18012: 24.3; Can't print a huge list structure in IELM
Date: Mon, 08 Aug 2016 21:47:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

severity 18012 minor
quit

sindikat@mail36.net (sindikat@mail36.net) writes:

> I have a function that creates a nested list in the form (x (x (x (x
> (...))))) arbitrarily deep:
>
> (defun nestify (xs)
>   (cl-reduce (lambda (x y) (if y (list x y) (list x))) xs :from-end t
>   :initial-value nil))
>
> In IELM when I try to call it on a sufficiently big list, it crashes
> with an error:
>
> ELISP> (nestify (number-sequence 1 1000))
> *** IELM Error ***  Error during pretty-printing (bug in pp)

It seems that the circularity check when print-circle is nil stops at a
depth of 200.

(prin1 (nestify (number-sequence 1 200))) ;=> (error "Apparently circular 
structure being printed")

Setting print-circle to t makes this (and printing for ielm) work fine.
Maybe ielm should bind print-circle to t always?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]