Subject: Re: bug#25295: Represent eieio objects using object-print in backtraces and edebug

From: Stefan Monnier <[email-masked]>
Date: Wed, 04 Jan 2017 20:51:14 -0500

> If an Elisp-level printer is available to users and developers, I think
> we'd have to assume they will throw any old thing in there, including
> `format' and `prin1'. Would making `prin1' reentrant solve all of the
> resulting problems?

Maybe the better solution would be to make `prin1` (and `format`, ..)
signal errors.  Instead, we could provide the printer with a special
prin1-like function which basically "continues" the print job in the
C code.

>> One more thing: there have already been other desires/needs to tweak the
>> printing from Elisp.  E.g. to special case printing of objects that
>> can't be printed readably (e.g. buffers, markers, overlays, ...).

> That's good! But the previous issue would still need to be resolved.

Yes, and they're largely independent: the printer you're talking about
would be used when we don't want to print readably, whereas this case
would apply to the situation where we want to print readably (in which
case we don't want to go through custom pretty printers like the one you
need).

        Stefan