From: Eric Ludlam <eric@siege-engine.com>
To: Eric Abrahamsen <eric@ericabrahamsen.net>, emacs-devel@gnu.org
Subject: Re: Improving representation of EIEIO objects in backtraces/error messages
Date: Sat, 7 Jan 2017 20:51:00 -0500 [thread overview]
Message-ID: <56e042cf-ee2d-03b0-ceba-f1483fa2b01c@siege-engine.com> (raw)
In-Reply-To: <87wpefakpe.fsf@ericabrahamsen.net>
On 12/31/2016 03:48 PM, Eric Abrahamsen wrote:
> Eric Ludlam <eric@siege-engine.com> writes:
>
>> On 12/29/2016 02:02 PM, Eric Abrahamsen wrote:
...
>> CEDET includes a 'data-debug' package. If you enable that it provides a
>> way to navigate giant data structures as you might get with EIEIO. It
>> is also a part of Emacs now, though I'm not that familiar with how it
>> all was merged.
>>
>> I have this in my .emacs file to take advantage of it:
>>
>> (require 'data-debug)
>> (global-set-key "\M-:" 'data-debug-eval-expression)
>
> That's interesting, thanks! I'll play with it a bit, it might be nice to
> add the slot names in with the values.
The slot names should be included in the display. At least they are for
me in my older Emacs. It may be that the eieio-support doesn't work
quite right after the EIEIO change in Emacs?
In CEDET, eieio-datadebug is separate, but with EIEIO as a piece of core
emacs with Data Debug, maybe the current tenuous load should be replaced
by merging eieio-datadebug into data-debug.
...
>> In the CEDET repository, you can get cedet-edebug.el. It includes
>> these two snippets that bind "A" to data debug.
>>
>> ;;;###autoload
>> (add-hook 'edebug-setup-hook
[...]
> These are all good for me as a developer, but I would also like to
> protect users from backtraces that might, ahem, arise from my code. Do
> you have any opinion on the discussion in
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25295 ? Anything would be
> welcome.
I'm not familiar with Emacs C level expression printing. That's why I
just stopped using built ins and added my own top level commands to get
things done.
The ideas represented in the thread where some special vector-form could
fork off to a special printer sounds like a pretty nice idea though.
That way more than just EIEIO objects could be simplified.
In the above thread, someone mentioned giving up an object's ability to
customize it's print output. This is a super handy feature where you
can take some key differentiator of your object that is short to put
into the short form print output. Taking advantage of that feature
makes using the short print output even better. Of course, the
developer needs to implement the method to make it work. I usually go
add a new print-object method when I'm debugging so I can figure out
what's going on.
Eric
next prev parent reply other threads:[~2017-01-08 1:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-29 19:02 Improving representation of EIEIO objects in backtraces/error messages Eric Abrahamsen
2016-12-29 20:32 ` Eli Zaretskii
2016-12-29 20:54 ` Eric Abrahamsen
2016-12-30 7:45 ` Eli Zaretskii
2016-12-31 19:48 ` Eric Ludlam
2016-12-31 20:48 ` Eric Abrahamsen
2017-01-08 1:51 ` Eric Ludlam [this message]
2017-01-08 17:24 ` Eric Abrahamsen
2017-01-12 0:47 ` Eric Ludlam
2017-01-12 1:36 ` Eric Abrahamsen
2017-01-12 1:47 ` Noam Postavsky
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=56e042cf-ee2d-03b0-ceba-f1483fa2b01c@siege-engine.com \
--to=eric@siege-engine.com \
--cc=emacs-devel@gnu.org \
--cc=eric@ericabrahamsen.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 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).