unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: 59213-done@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#59213: Emacs 29: Edebug fails to instrument a parameter whose name begins with _
Date: Tue, 14 Feb 2023 16:47:03 -0500	[thread overview]
Message-ID: <jwv7cwk2ate.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <Y+d5RPAesoTuvdEb@ACM> (Alan Mackenzie's message of "Sat, 11 Feb 2023 11:17:24 +0000")

>>     (function (lambda () ,@forms))
>> with
>>     (function (lambda () :closure-dont-trim-context ,@forms))
>> and then have `cconv-make-interpreted-closure` look for this
>> tell-tale sign.
> Interesting.  Isn't there a good chance this would foul up programs which
> analyse the structure of a closure?

It's possible, indeed.  Such programs should be quite rare, tho.
I'd expect packages which analyse such code would either:
A) be Edebug-specific and would have to handle any values of `forms`, in
   which case having `:closure-dont-trim-context` prepended to it would
   not affect them.
B) be non-Edebug specific in which case they should be looking for
   a specific pattern somewhere inside `forms` and they should presumably
   not find the above transformation worse than the other transformations
   applied by Edebug in general.

> (A bit like testcover-analyze-coverage analyses the calling structure
> of edebug-enter).

Indeed, it's only such code I have found so far.  I know there are other
tools out there that use Edebug's instrumentation in creative ways, but
I can't remember where they are.

And, AFAICT in the case of `testcover.el`, the above suggestion would
"just work" (fall into case (A)) whereas your approach required a tweak.

I'll try it on `master`.


        Stefan






  reply	other threads:[~2023-02-14 21:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12  9:35 bug#59213: Emacs 29: Edebug fails to instrument a parameter whose name begins with _ Alan Mackenzie
2022-11-14  2:48 ` Michael Heerdegen
2022-11-14  3:53 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-14 10:28   ` Alan Mackenzie
2022-11-14 12:50     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-14 12:56     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-10 18:51       ` Alan Mackenzie
2023-02-10 22:05         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11  7:26           ` Eli Zaretskii
2023-02-13  3:26             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-13 12:54               ` Eli Zaretskii
2023-02-11 11:17           ` Alan Mackenzie
2023-02-14 21:47             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-14 22:19         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-18 18:08           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-18 18:46           ` Alan Mackenzie
2023-02-20 22:21             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-15 13:08   ` Eli Zaretskii

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=jwv7cwk2ate.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=59213-done@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=eliz@gnu.org \
    --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).