From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: npostavs@users.sourceforge.net,Eli Zaretskii <eliz@gnu.org>
Cc: 25295@debbugs.gnu.org
Subject: bug#25295: Acknowledgement (26.0.50; Represent eieio objects using object-print in backtraces and edebug)
Date: Fri, 30 Dec 2016 11:14:49 -0800 [thread overview]
Message-ID: <01696DFE-7C0E-4FAC-8893-B6826DF7BCA8@ericabrahamsen.net> (raw)
In-Reply-To: <87bmvu84lj.fsf@users.sourceforge.net> (npostavs's message of "Thu, 29 Dec 2016 22:42:48 -0500")
On 12/29/16 22:42 PM, npostavs@users.sourceforge.net wrote:
> You mean print_object? I thought the idea would be to change edebug and
> backtrace code to (optionally?) use object-print instead of print.
I do mean print_object, sorry. (And sorry I keep replying to you only!)
On 12/30/16 09:51 AM, Eli Zaretskii wrote:
>> From: Eric Abrahamsen <eric@ericabrahamsen.net>
>> Date: Thu, 29 Dec 2016 13:50:09 -0800
>>
>> I guess this would require going into print.c and adding another branch
>> under the Lisp_Vectorlike case statement of object_print.
>>
>> Is this sort of C code allowed to call back up to the lisp object-print
>> function?
>
> If that Lisp function will then call print.c again, that's not a good
> idea, since print.c internally uses a buffer by a certain fixed name.
`object-print' ends up using `format', which looks like it calls print.c
functions, so I guess that's out.
I don't know the right level at which to intervene. All other lisp
objects get a hard-coded #<obj representation from print_object in
print.c, only eieio objects "fake it" with a user-overrideable lisp
function. I suspect eieio objects won't be considered "fundamental" on
the same level as markers, buffers, etc., so maybe they don't belong in
print_object (plus the above problem of calling lisp-c-lisp-c).
I don't see how we could hijack at the lisp level, though. Functions
like `eval-expression' and `backtrace--print-frame' simply toss whole
lisp structures to prin1, there's no way to know that there's an eieio
object somewhere in that structure.
Personally, I'd be willing to lose the ability to customize object
representations with `object-print', if it meant that print_object could
produce a #<obj notation for eieio objects. That would mean writing a
C test like INSTANCEP or what have you.
I don't know what the right solution is!
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
next prev parent reply other threads:[~2016-12-30 19:14 UTC|newest]
Thread overview: 74+ 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 [this message]
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
2017-02-21 17:23 ` Stefan Monnier
2017-02-22 16:15 ` Richard Stallman
2017-02-22 19:08 ` Stefan Monnier
2017-03-02 5:36 ` Elisp printer (was: bug#25295: Represent eieio objects using object-print in backtraces and edebug) Michael Heerdegen
2017-03-02 6:38 ` Elisp printer Stefan Monnier
2017-03-03 2:14 ` Michael Heerdegen
2017-03-03 2:38 ` Stefan Monnier
2017-03-03 4:23 ` Michael Heerdegen
2017-03-06 2:50 ` Stefan Monnier
2017-03-08 4:09 ` Tom Tromey
2017-03-08 4:39 ` Stefan Monnier
2017-03-08 6:35 ` Tom Tromey
2017-03-08 9:43 ` Stefan Monnier
2017-03-08 18:17 ` Lars Brinkhoff
2017-03-08 23:02 ` Stefan Monnier
2017-03-09 15:12 ` Lars Brinkhoff
2017-03-14 9:52 ` User-defined record types Lars Brinkhoff
2017-03-14 12:28 ` Lars Brinkhoff
[not found] ` <86bmt42nk2.fsf_-_@molnjunk.nocrew.org>
[not found] ` <jwvzigoow0k.fsf-monnier+emacs@gnu.org>
2017-03-14 13:25 ` Lars Brinkhoff
2017-03-14 14:28 ` Lars Brinkhoff
2017-03-14 15:20 ` Stefan Monnier
2017-03-14 17:23 ` Lars Brinkhoff
2017-03-15 14:38 ` Stefan Monnier
2017-03-15 18:14 ` Lars Brinkhoff
2017-03-15 19:12 ` Stefan Monnier
2017-03-15 19:21 ` Lars Brinkhoff
2017-03-15 20:05 ` Stefan Monnier
2017-03-15 21:49 ` Lars Brinkhoff
2017-03-15 23:42 ` Stefan Monnier
2017-03-16 3:05 ` Stefan Monnier
2017-03-16 3:08 ` Stefan Monnier
2017-03-16 20:03 ` Lars Brinkhoff
2017-03-16 21:32 ` Stefan Monnier
2017-03-17 11:22 ` Lars Brinkhoff
2017-03-17 20:45 ` Lars Brinkhoff
2017-03-18 23:24 ` Stefan Monnier
2017-03-18 23:36 ` Stefan Monnier
2017-03-19 9:34 ` Lars Brinkhoff
2017-03-19 12:42 ` Stefan Monnier
2017-03-02 7:00 ` bug#25295: 26.0.50; Represent eieio objects using object-print in backtraces and edebug Stefan Monnier
2017-03-02 12:52 ` npostavs
2017-03-02 13:38 ` Stefan Monnier
2017-03-11 5:43 ` npostavs
2017-03-11 15:38 ` New pp (was: bug#25295: 26.0.50; Represent eieio objects using object-print in backtraces and edebug) Stefan Monnier
2017-03-11 16:05 ` Noam Postavsky
2017-03-11 16:40 ` New pp Stefan Monnier
2017-03-11 16:52 ` Noam Postavsky
2017-03-11 16:57 ` Stefan Monnier
2017-03-12 13:31 ` Noam Postavsky
2017-03-12 14:06 ` Stefan Monnier
2017-03-12 16:13 ` Noam Postavsky
2017-03-02 17:35 ` bug#25295: 26.0.50; Represent eieio objects using object-print in backtraces and edebug 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01696DFE-7C0E-4FAC-8893-B6826DF7BCA8@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=25295@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=npostavs@users.sourceforge.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.