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

From: Noam Postavsky <[email-masked]>
Date: Thu, 12 Apr 2018 10:21:54 -0400

"Basil L. Contovounesios" <[email-masked]> writes:

>>> ELISP> (nestify (number-sequence 1 1000))
>>> *** IELM Error ***  Error during pretty-printing (bug in pp)

>> (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?
>
> I agree, given that ielm now uses cl-prin1:

On the other hand, wouldn't it be confusing if ielm printing behaves
differently from normal printing?  Maybe all that needs to be fixed is
the ielm error message for this case, which seems fairly uninformative
at the moment.

> 1. emacs -Q
> 2. M-x emacs-version RET
>      => GNU Emacs 27.0.50
>         (build 2, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>         of 2018-04-08
> 3. M-x ielm RET
> 4. (let ((l (make-list 2 0)))
>      (nconc l (cdr l)))
> 5. C-m
>      => infloop
> 6. C-g
>      => *** IELM Error ***  Quit during pretty-printing

> Does this behaviour warrant a new bug?

Yes, I would say so (for cl-prin1 specifically).