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

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

bug#25295: Acknowledgement (26.0.50; Represent eieio objects using objec


From: Eric Abrahamsen
Subject: bug#25295: Acknowledgement (26.0.50; Represent eieio objects using object-print in backtraces and edebug)
Date: Sat, 31 Dec 2016 12:52:12 -0800
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/26.0.50 (gnu/linux)

On 12/31/16 14:23 PM, npostavs@users.sourceforge.net wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> On 12/31/16 00:48 AM, npostavs@users.sourceforge.net wrote:
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>
>>> I think the only way to integrate `object-print' with the existing
>>> `print' functions, would be to make it follow the same protocol.  That
>>> is, currently `object-print' is really `object-to-string', it should be
>>> changed (or perhaps a new function (e.g., `print-object') would be a
>>> better idea, so as not to break existing code too much) to accept a
>>> PRINTCHARFUN argument, and print to it.
>>
>> The problem is that pretty much all of the printing happens at the C
>> level. Whole lisp structures are sent directly to C, and it's the C code
>> that recurses through them and decides how to print everything it finds
>> inside. Lisp code never gets a chance (except in a few very specific
>> situations).
>>
>> For example: when an error is raised, `backtrace--print-frame' gets all
>> the contents of the error as a single argument. It simply punts that to
>> `prin1', and then it's done. There's no chance to pick apart that single
>> argument and see if there is an object inside. `eval-expression'
>> essentially does the same thing.
>>
>
> You would need to add a branch in print_object to detect eieio objects,
> same as for the other alternative.

Well sure, that's what this whole thread started out with.





reply via email to

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