From: npostavs@users.sourceforge.net
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eric Abrahamsen <eric@ericabrahamsen.net>, 25295@debbugs.gnu.org
Subject: bug#25295: Represent eieio objects using object-print in backtraces and edebug
Date: Mon, 20 Feb 2017 21:56:47 -0500 [thread overview]
Message-ID: <878tp0i74g.fsf@users.sourceforge.net> (raw)
In-Reply-To: <jwvshoyazvd.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Wed, 04 Jan 2017 23:37:26 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Actually, print.c is already setup to be (at least partially) reentrant
>> (for the case `printcharfun` is a function), so maybe making it fully
>> reentrant won't be too hard. But we'd still want to provide some ad-hoc
>> prin1-like function which continues the print job rather than starting
>> a new nested one; this is needed e.g. if the custom printer wants to
>> print a value V but V has already been printed so it should be printed
>> as a reference #NN# to the previous one.
>
> Looking further at the code, maybe this isn't even needed, since the
> print-number-table can survive calls to print. But that can get ugly
> when your printer code also want to call `print` for "unrelated"
> purposes (e.g. to print debug messages in a side buffer).
> And I'll stop thinking about interaction with concurrency.
Can we allow overriding printing of primitive types too? I'm wanting
that for e.g., printing byte code functions in nicer ways.
Looking to Common Lisp for inspiration, there is generic function
print-object[1], and also *print-pprint-dispatch* (an alist of type
specifiers -> printer functions).
Cycle detection state seems to be packed in with STREAM, which is
convenient, although dispatching on STREAM becomes harder.
[1]: http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/stagenfun_print-object.html
[2]: http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_22-2-1-4.html
next prev parent reply other threads:[~2017-02-21 2:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-29 20:52 bug#25295: 26.0.50; Represent eieio objects using object-print in backtraces and edebug Eric Abrahamsen
[not found] ` <handler.25295.B.148304476023950.ack@debbugs.gnu.org>
2016-12-29 21:50 ` bug#25295: Acknowledgement (26.0.50; Represent eieio objects using object-print in backtraces and edebug) Eric Abrahamsen
2016-12-30 3:42 ` npostavs
2016-12-30 19:14 ` Eric Abrahamsen
2016-12-31 5:48 ` npostavs
2016-12-31 18:56 ` Eric Abrahamsen
2016-12-31 19:23 ` npostavs
2016-12-31 20:52 ` Eric Abrahamsen
2016-12-30 7:51 ` Eli Zaretskii
2017-01-03 18:21 ` bug#25295: Represent eieio objects using object-print in backtraces and edebug Stefan Monnier
2017-01-04 23:40 ` Eric Abrahamsen
2017-01-05 1:51 ` Stefan Monnier
2017-01-05 2:11 ` Stefan Monnier
2017-01-05 4:37 ` Stefan Monnier
2017-01-05 15:39 ` Eli Zaretskii
2017-01-06 0:42 ` Stefan Monnier
2017-01-06 7:50 ` Eli Zaretskii
2017-02-21 2:56 ` npostavs [this message]
2017-02-21 17:23 ` Stefan Monnier
2017-02-22 16:15 ` Richard Stallman
2017-02-22 19:08 ` Stefan Monnier
2017-03-02 7:00 ` bug#25295: 26.0.50; " Stefan Monnier
2017-03-02 12:52 ` npostavs
2017-03-02 13:38 ` Stefan Monnier
2017-03-11 5:43 ` npostavs
2017-03-02 17:35 ` Eric Abrahamsen
2017-03-02 18:31 ` Stefan Monnier
2017-10-21 21:36 ` Eric Abrahamsen
2017-10-22 3:21 ` Stefan Monnier
2018-10-18 19:01 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878tp0i74g.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=25295@debbugs.gnu.org \
--cc=eric@ericabrahamsen.net \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).