From: Allen Li <darkfeline@felesatra.moe>
To: gazally@runbox.com
Cc: acm@muc.de, 33201@debbugs.gnu.org
Subject: bug#33201: 26.1; Edebug doesn't work on closures with edebug-unwrap-results
Date: Fri, 2 Nov 2018 00:13:31 -0700 [thread overview]
Message-ID: <CADbSrJz=-u5Vunp655df-b=6yxhaSHsCuEi6oyKPt-eH=Yrm1A@mail.gmail.com> (raw)
In-Reply-To: <871s84jt3v.fsf@runbox.com>
On Thu, Nov 1, 2018 at 4:07 PM Gemini Lasswell <gazally@runbox.com> wrote:
>
> I agree with Eli that this is not a major problem. I suggest
> we close it as fixed in 27.1.
>
> Allen, unless you are doing the kind of debugging described in the
> docstring for 'edebug-unwrap-results', meaning debugging a macro where
> the results of expressions might include Edebug instrumentation, just
> leave it set to nil.
I can live with that, especially since the backport sounds non-trivial.
> Even if you are doing that kind of debugging, first try it without
> setting 'edebug-unwrap-results' non-nil, because if things are going
> wrong with the Edebug instrumentation because the debug spec for the
> macro is incorrect, which is the most common problem with Edebug and
> macros, then having Edebug unwrap the results will make it harder to
> figure out what the bug is.
>
> >> > I can: it's quite complex, and even includes gratuitous refactoring of
> >> > 'cond' as 'pcase'.
>
> When I have to dig several levels deep in a Lisp expression, I prefer to
> use pcase instead of expressions like "(nthcdr 2 (nth 1 (nth 3 sexp)))"
> but I can see that it is a matter of taste.
>
> >> OK. How about me doing a simpler, but less lazy fix which would just
> >> add handling of `closure' into the existing cond form?
> >
> > That's one thing; the other is why do we need to change edebug-unwrap1
> > as well? AFAIU, that takes care of a separate issue, right?
>
> The problem isn't only closures, it's that edebug-unwrap* in emacs-26
> doesn't handle dotted forms. For example, evaluating:
>
> (edebug-unwrap* '(setq foo '(1 . 1)))
>
> or trying to step through this with Edebug with edebug-unwrap-results
> set non-nil:
>
> (defmacro my-macro (arg)
> (let ((foo '(1 . 1)))
> `(setq ,arg ',foo)))
>
> will result in: (wrong-type-argument listp 1)
>
> The reason I rewrote edebug-unwrap* was to make it robust enough to
> handle anything it might find in backtrace frames, including dotted
> forms and circular data structures, so that I could use it to make working
> *Backtrace* buffers for Edebug that defaulted to not showing the
> instrumentation but let you toggle its visibility. Making
> edebug-unwrap-results work in more situations was a side effect.
prev parent reply other threads:[~2018-11-02 7:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 6:49 bug#33201: 26.1; Edebug doesn't work on closures with edebug-unwrap-results Allen Li
[not found] ` <mailman.3074.1540882208.1284.bug-gnu-emacs@gnu.org>
2018-10-31 15:06 ` Alan Mackenzie
2018-11-01 3:53 ` Allen Li
2018-11-01 10:00 ` Alan Mackenzie
2018-11-01 18:15 ` Eli Zaretskii
2018-11-01 19:59 ` Alan Mackenzie
2018-11-01 20:18 ` Eli Zaretskii
2018-11-01 23:06 ` Gemini Lasswell
2018-11-02 7:13 ` Allen Li [this message]
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='CADbSrJz=-u5Vunp655df-b=6yxhaSHsCuEi6oyKPt-eH=Yrm1A@mail.gmail.com' \
--to=darkfeline@felesatra.moe \
--cc=33201@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=gazally@runbox.com \
/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.