From: Eric Ludlam <ericludlam@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
"Eric M. Ludlam" <zappo@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: eieio-debug-methodinvoke
Date: Wed, 21 Jan 2015 22:14:14 -0500 [thread overview]
Message-ID: <54C06B06.4010101@gmail.com> (raw)
In-Reply-To: <jwva91cynyz.fsf-monnier+emacs@gnu.org>
On 01/21/2015 01:48 PM, Stefan Monnier wrote:
> Hi Eric,
>
> Not sure if you've seen it, but on Emacs's master, EIEIO's
> defgeneric/defmethod has been replaced by a brand new implementation (in
> cl-generic). Now that the main part of the switch is done, I'm working
> on cleaning up all the regressions that this introduced.
I did a git pull tonight to check it out. I'm looking forward to trying
out multiple-dispatch and native type dispatch method handling. I spent
a lot of time optimizing the eieio version. Hopefully some of those same
high level tricks remain. (Comments indicate so.)
In the meantime, my CEDET can't seem to load old .ede files. :( I'll
assume I need to recompile or something for now.
> Among them, there's eieio-debug-methodinvoke (in eieio-datadebug.el).
> Looking at the code I can kind of see what this is meant to do, but
> I can't seem to find a way to make it do something useful (in
> Emacs-24.4).
> I tried
>
> emacs -Q -f semantic-mode -l eieio-datadebug
> M-x eieio-debug-methodinvoke RET
> semanticdb-synchronize RET
> (semantic-decoration-unparsed-include-cache "toto") RET
>
> but this just gave me ">#<list o' stuff: 2 entries>". Do you have
> a sample recipe that gives a good/useful result?
>
That function was useful when I was trying to get the method invocation
order to be correct, and I needed a way to debug it. Since those old
structures are gone, this function won't be needed by me anymore.
As for what it outputs, all the data-debug functions you run into in
CEDET go into a data-debug mode. The problem I have debugging programs
that use eieio objects, and some of the crazy structures that get built
up in CEDET is that there is so much data, a simple princ (as from
edebug) just can't tell you what's going on. As such, all the outputs
for data-debug are usually very small. In the above case, just a list
o' stuff.
Press SPC on any line that indicates there might be more to it, such as
a #<list o stuff> or #<overlay > or some # object (usually colored) to
open it up. If there are lists upon lists, you can keep drilling in,
even recursive structures are opened.
Example:
If you have (semantic-mode 1) enabled, you could do:
M-x data-debug-eval-expression RET (semantic-fetch-tags) RET
in some Emacs Lisp buffer. You can navigate around the data structure
browsing the tags using SPC to open/close, or n/p to move up/down or N/P
to move up/down while also opening what's under point.
I have that fcn bound to M-: by default, and hooked into edebug via an A
binding so I can eval large data values. I've become quite dependent on it.
Eric
next prev parent reply other threads:[~2015-01-22 3:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-21 18:48 eieio-debug-methodinvoke Stefan Monnier
2015-01-22 3:14 ` Eric Ludlam [this message]
2015-01-22 16:56 ` eieio-debug-methodinvoke Stefan Monnier
2015-01-22 19:51 ` eieio-debug-methodinvoke Stefan Monnier
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=54C06B06.4010101@gmail.com \
--to=ericludlam@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=zappo@gnu.org \
/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.