GNU bug report logs - #18012
24.3; Can't print a huge list structure in IELM

Previous Next

Package: emacs;

Reported by: sindikat <at> mail36.net (sindikat <at> mail36.net)

Date: Mon, 14 Jul 2014 07:13:02 UTC

Severity: minor

Found in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #10 received at control <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: sindikat <at> mail36.net (sindikat <at> mail36.net)
Cc: 18012 <at> debbugs.gnu.org
Subject: Re: bug#18012: 24.3; Can't print a huge list structure in IELM
Date: Mon, 08 Aug 2016 21:47:30 -0400
severity 18012 minor
quit

sindikat <at> mail36.net (sindikat <at> 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?




This bug report was last modified 3 years and 319 days ago.

Previous Next


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