GNU bug report logs - #38195
27.0.50; `edebug-remove-instrumentation' doesn't work for adviced functions

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Michael Heerdegen <michael_heerdegen@HIDDEN>; dated Wed, 13 Nov 2019 13:56:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 27 Nov 2019 12:18:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 27 07:18:02 2019
Received: from localhost ([127.0.0.1]:53591 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iZwGf-0003Gt-Mt
	for submit <at> debbugs.gnu.org; Wed, 27 Nov 2019 07:18:02 -0500
Received: from quimby.gnus.org ([95.216.78.240]:55478)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iZwGe-0003GX-1J
 for 38195 <at> debbugs.gnu.org; Wed, 27 Nov 2019 07:18:00 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iZwGW-0001Ru-4c; Wed, 27 Nov 2019 13:17:54 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN> <87eey9z1mr.fsf@HIDDEN>
 <87o8xaoe6j.fsf@HIDDEN> <jwvzhgu7apl.fsf-monnier+emacs@HIDDEN>
 <877e3t78l5.fsf@HIDDEN> <87a78iuzbn.fsf@HIDDEN>
Date: Wed, 27 Nov 2019 13:17:51 +0100
In-Reply-To: <87a78iuzbn.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 26
 Nov 2019 22:01:32 +0100")
Message-ID: <87r21tecnk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Michael Heerdegen <michael_heerdegen@HIDDEN> writes: >
 Michael
 Heerdegen <michael_heerdegen@HIDDEN> writes: > >> BTW, I also wonder if we
 should enhance the command >> `edebug-remove-instrumentation' so that it
 is able to reload source >> files. It coul [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: Stefan Monnier <monnier@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>
>> BTW, I also wonder if we should enhance the command
>> `edebug-remove-instrumentation' so that it is able to reload source
>> files.  It could look at the SYMOL's `symbol-file's, collect these, load
>> the files, and only do what it does now for the symbols that are still
>> wrapped.
>
> Here is a draft.  Any thoughts (Lars)?

[...]

> +(defcustom edebug-reload-files 'ask
> +  "Whether `edebug-remove-instrumentation' should reload files.
> +
> +When non-nil, `edebug-remove-instrumentation' will reload files
> +where possible to get rid of instrumentation.  When the non-nil
> +value is the symbol 'ask, ask for every individual file before
> +loading it.

I don't think this is something that should be mixed up with the
edebug-remove-instrumentation command.  Reloading files can have other
side effects, and those may get in the way.  The user just wants the
edebugging to go away so that they can continue to use Emacs, not change
other bits.

But adding a new command like edebug-reload-instrumented-files would be
OK.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 26 Nov 2019 21:01:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 16:01:47 2019
Received: from localhost ([127.0.0.1]:53088 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iZhxz-0004lh-AF
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2019 16:01:47 -0500
Received: from mout.web.de ([212.227.17.12]:51193)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iZhxy-0004lU-78
 for 38195 <at> debbugs.gnu.org; Tue, 26 Nov 2019 16:01:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1574802093;
 bh=DJOt+0/HoOLr1LTkNbb2tLDGnrcjNOPUrXae9T42AGM=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=iPDeoSvoysZvrMJLwpyVKpooo0VzWpfL0I/jzRbWUet/IO4R7es+im9X4bOt7kcFz
 rQ5UJKjuZiKUyxPQJqGIFHyOjNtazztyWHXa2pyGMPZWZghBQdQvOA0UvLKTgkckg7
 /tEflKUZVIhzckfcftqUR72j2Fh+iB7mD95sTBoA=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb102
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MMVpy-1iSYIF1n5i-008JpD; Tue, 26
 Nov 2019 22:01:33 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN> <87eey9z1mr.fsf@HIDDEN>
 <87o8xaoe6j.fsf@HIDDEN> <jwvzhgu7apl.fsf-monnier+emacs@HIDDEN>
 <877e3t78l5.fsf@HIDDEN>
Date: Tue, 26 Nov 2019 22:01:32 +0100
In-Reply-To: <877e3t78l5.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 21
 Nov 2019 12:49:26 +0100")
Message-ID: <87a78iuzbn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:PvSO51OqC0g73Mziqwh3r2LCFHIYf6kfy1RTguJD8G+fDrEwkAf
 i00Yo76TS2D9xnH0ff2vmWcueeZ3kACIPrVV3S+q3+0SAAzBNoXs0oVkPyllHz1MkaQ3fPi
 6B8DThBi/uxb+sNbPBIEI15jc+Zr2hVhem/94NhD1Xt62hm5RY9m10+xJTRlJ52Xu8IEQ8A
 i9EzAj0f3FWYcvdoWTdmg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:DWEQTgeXwGE=:An90YADeUe+qPwJfaRGXza
 SLnlJtHtbyVgQZcgjqCtJxCDtEJ66LoiqL2B84P86RqJLsPmQIO5GJ9nvl498EKccvfx76xoI
 liQdqQUJdB8V3bExwnwmx+Uuj+wl0amyv0ofdA0cABIpnBh3J91hUh2vovcdEgmKH8hyuHKrU
 2DSFPxM/Jai3Hkgwn7LC4NUo/R/Dsvg8gl24BTn3jC+nBiPhDbOJCGoSmPRQtTNtBw0rP5JGX
 UmHrbznTC40GGfJEIcNsVivjJKgMLV0ZnG9hF4esfe85AE4q2DlwgWN1gKe0Il0u/+r7DbqBy
 Li548R57yZSrSHZpIxPdf8+w/3e5rQfe7qrj5OyeOWLkc7XMrT0VcxsSPB868YHjqxjsGQnLR
 szfbDZSWBKDnhV1zUURwnrGwlclP55G3opZJx4MWBeshYTGTufvJznua8/k5QVsh0dmSYkXnd
 y0jproylYSxqyR9BGbTXUnDEzvrLmKpQ8ZTmtuAefwiE8I8M7Hgb+pDvKKrUZNI8GdsofMCcM
 GfWNzHpB1FUZ7xPzjvF6gn/x3pfCXZWY5FTm7+sjB3C5F8i7BkHHGQGH/T0kd8LFvXxiULig0
 t2KgDVshaQDUyMIJuraBcfXGPE/frWoVecHjD/+f+GrxSRFYVIKBM5unpbST+28V6DlIYotNC
 rd8JQgSxTGdZPU+4EK8oTk8UkmZ+KSSkWoHpLYO7rUQxgjANRqcYbIUpkoPS6hyoQs65fDkjo
 cHWDBa84VbdwmilEUOY9ccn6DG4NluYjVT9HKJywCdRgT3BMFVOoWq4mU2gi1vPjFELvxucVi
 p8P2GeZ7U8zIX8arrKKO1zou7c7gH1r+9b3J7NiflU8AVGwvWaahRFn35sXSkd2ND0110vi3G
 2o6UQL1e41jKqgSuCRMNOGd51ZsHT2wAe2yGptvoAjKO0caYUsJ1qTKHtHs99RnpvyZWiN1jh
 O+nSeRbQsBLVvDIovLshctjZivu55QM/Ozs0XHMfZRhhcRrUbnYpweOsZmQuAMRkor9zFjlIU
 GyENsZPY3GfXQGVKj3aDGOQ1eqd1RGKOTPDMkfVIiP1tTg9osePTID6NcsVT9PTbcKmMwpD/Y
 J0BqF2FQ92PLnNIW8Zor2/2Fe+WHS3L7Wz2HgexFxJU8IVKIsh/9DShvvli3wfCe5ed72L4rK
 0IYwUwgNbfR8NSeIbgpVPTg30+m9sOIExtSPjwDrUUk0sM8jqX6LaN0hbBDreLQSA2vHPBwxa
 eejt3SMPZENcKOlVGxU8Yk0CH/8l6Hz0PLa0XxTP4UIpMY3Mvpa0VFSzgaSE=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: Stefan Monnier <monnier@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> BTW, I also wonder if we should enhance the command
> `edebug-remove-instrumentation' so that it is able to reload source
> files.  It could look at the SYMOL's `symbol-file's, collect these, load
> the files, and only do what it does now for the symbols that are still
> wrapped.

Here is a draft.  Any thoughts (Lars)?


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-WIP-edebug-see-38195-ask-whether-to-reload-files-to-.patch
Content-Transfer-Encoding: quoted-printable

=46rom 681370954b2f5168e6e0793a9a7ded76db671682 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Tue, 26 Nov 2019 19:23:45 +0100
Subject: [PATCH] WIP: edebug: see 38195, ask whether to reload files to
 deinstrument

=2D--
 lisp/emacs-lisp/edebug.el | 73 ++++++++++++++++++++++++++++++---------
 1 file changed, 57 insertions(+), 16 deletions(-)

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index d68ed966f8..29bb27fc0d 100644
=2D-- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -4586,36 +4586,77 @@ edebug--unwrap*-symbol-function
         (was-macro               `(macro . ,unwrapped))
         (t                       unwrapped))))))

+(defcustom edebug-reload-files 'ask
+  "Whether `edebug-remove-instrumentation' should reload files.
+
+When non-nil, `edebug-remove-instrumentation' will reload files
+where possible to get rid of instrumentation.  When the non-nil
+value is the symbol 'ask, ask for every individual file before
+loading it.
+
+When nil or when no defining file can be found remove edebug
+instrumentation by manipulating symbol functions."
+  :type '(choice (const :tag "On" t)
+                 (const :tag "Ask for every file" ask)
+                 (const :tag "Off" nil)))
+
+(defun edebug-get-instrumented-functions ()
+  (let ((functions '()))
+    (mapatoms
+     (lambda (symbol)
+       (when (and (get symbol 'edebug)
+                  (or (functionp symbol)
+                      (macrop symbol))
+                  (edebug--unwrap*-symbol-function
+                   symbol))
+         (push symbol functions)))
+     obarray)
+    functions))
+
 (defun edebug-remove-instrumentation (functions)
   "Remove Edebug instrumentation from FUNCTIONS.
 Interactively, the user is prompted for the function to remove
 instrumentation for, defaulting to all functions."
   (interactive
    (list
-    (let ((functions nil))
-      (mapatoms
-       (lambda (symbol)
-         (when (and (get symbol 'edebug)
-                    (or (functionp symbol)
-                        (macrop symbol))
-                    (edebug--unwrap*-symbol-function
-                     symbol))
-           (push symbol functions)))
-       obarray)
+    (let ((functions (edebug-get-instrumented-functions)))
       (unless functions
         (error "Found no functions to remove instrumentation from"))
       (let ((name
              (completing-read
               "Remove instrumentation from (default all functions): "
               functions)))
-        (if (and name
-                 (not (equal name "")))
+        (if (and name (not (equal name "")))
             (list (intern name))
-          functions)))))
-  ;; Remove instrumentation.
+          t)))))
+  (unless (listp functions)
+    (setq functions (edebug-get-instrumented-functions)))
+  (when edebug-reload-files
+    (let ((files '()))
+      (dolist (f functions)
+        (when-let ((file (symbol-file f 'defun)))
+          (unless (cl-some (apply-partially #'file-equal-p file) files)
+            (push file files))))
+      (let ((do-all (eq edebug-reload-files t))
+            file)
+        (while files
+          (setq file (pop files))
+          (when (or do-all
+                    (pcase (car (read-multiple-choice
+                                 (format "Load %s ?" file)
+                                 (list (list ?y "y" "Reload this file")
+                                       (list ?Y "Y" "\
+Reload this and all following files")
+                                       (list ?n "n" "Don't load this file=
")
+                                       (list ?N "N" "\
+Don't load this and any following files"))))
+                      (?y t)
+                      (?Y (setq do-all t)  t)
+                      (?n nil)
+                      (?N (setq files nil) nil)))
+            (load file 'noerror nil 'nosuffix))))))
   (dolist (symbol functions)
-    (when-let ((unwrapped
-                (edebug--unwrap*-symbol-function symbol)))
+    (when-let ((unwrapped (edebug--unwrap*-symbol-function symbol)))
       (defalias symbol unwrapped)))
   (message "Removed edebug instrumentation from %s"
            (mapconcat #'symbol-name functions ", ")))
=2D-
2.24.0


--=-=-=
Content-Type: text/plain



Regards,

Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 23 Nov 2019 13:32:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 23 08:32:40 2019
Received: from localhost ([127.0.0.1]:55986 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iYVWd-0004Ij-Il
	for submit <at> debbugs.gnu.org; Sat, 23 Nov 2019 08:32:38 -0500
Received: from mout.web.de ([212.227.17.11]:43685)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iYVWZ-0004Dh-Lr
 for 38195 <at> debbugs.gnu.org; Sat, 23 Nov 2019 08:32:34 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1574515933;
 bh=0x2aAE4XY7Ou5qZ8r0uxqRpQm8HywS1bIPoyMVuu4kM=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=nEGnWJX9jZl3SSo6P56jhjEDmNDVmhtrTQ7gBH3Um854sBacuRXVC++2FGaDUKzas
 PeO4IdJxJxzdLZt5S7RTo9ZqmKaJXLJTmmrG4Kgvn/EC/khvEE8RDOqLmxB7sDegO5
 jt+DjCTvgq77bmsNoPjMQ93boGUPwuZvYXY82ABI=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb101
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MTPn1-1iR7Fq0W3j-00SOgJ; Sat, 23
 Nov 2019 14:32:13 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN> <87eey9z1mr.fsf@HIDDEN>
 <87o8xaoe6j.fsf@HIDDEN> <jwvzhgu7apl.fsf-monnier+emacs@HIDDEN>
 <877e3t78l5.fsf@HIDDEN>
Date: Sat, 23 Nov 2019 14:32:12 +0100
In-Reply-To: <877e3t78l5.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 21
 Nov 2019 12:49:26 +0100")
Message-ID: <87v9rabtwj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:HJDQZSmWCm+6vhBZ1IokwmYKWAOQ7CqJWWFCOM1cThRkLbpVulm
 BF/TrJPu5FgzOdn4mUYS1eRYfK+I2xWNp4HexIWPhXr9fOFp4JjmapU48B+ih4i2HadB5fe
 Buw07Aj9NL7e56ZYB+2ceGcKOZENKHJNYmcoCAGHiCLal4Rc3vvLQRPxnJPA3oNH1Krb4I2
 svqroQlTdItmU9+Gjs1+A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:PUGtZ7kqA2A=:Ncc5BeS8SreHA3YdnY8/Oc
 NIrwJhLahttXVLUUBOPryp4NwyUKdxFBHGl1tiKFjUd8HenLIlALx6URkILErhu+R47ukfn5Y
 UxtRa8LrzUF4tibW89e5PHxLeDe73EtMH+35xK9LimkYP7U41z04pnYINtrJQrwzBLnCWpz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1WwcYwNW0NTW8NOdOkH+5KIJFiJ9YEg5teSGj0AEBiUQU
 bG4+C3zuePmYgpIndvjIfDP1OGl/Jqu+R63jCuG6KIhtOBSGCEcRLbxGse5c=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> New patch:

I've installed that patch now.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 21 Nov 2019 11:49:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 06:49:51 2019
Received: from localhost ([127.0.0.1]:51413 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iXky4-0006M7-Ho
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2019 06:49:48 -0500
Received: from mout.web.de ([212.227.17.11]:45559)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iXkxy-0006Lh-RR
 for 38195 <at> debbugs.gnu.org; Thu, 21 Nov 2019 06:49:44 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1574336968;
 bh=vwbXY5nKM1vROXOWpy6XUQjjD2cjh+ZJz39OCmDBb8o=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=p02wds4xeGJtWgC/9hnLvBk+o7eNod0g+c8eMLwtcsFI0G+jQb6B97DgIgYJzMt5a
 Ov7zFkSnps1e7/lerTX5Ja7b1d5fpYfxucADz0X0uu4f1xPKfkeFPdGBcoq0qEIbx8
 GWdlzgeqma14XqvXGyfLA+0NjGKQxhwlcku8Glxo=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb101
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lrs70-1hqLBu2AWM-013f7S; Thu, 21
 Nov 2019 12:49:28 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN> <87eey9z1mr.fsf@HIDDEN>
 <87o8xaoe6j.fsf@HIDDEN> <jwvzhgu7apl.fsf-monnier+emacs@HIDDEN>
Date: Thu, 21 Nov 2019 12:49:26 +0100
In-Reply-To: <jwvzhgu7apl.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sun, 17 Nov 2019 11:04:34 -0500")
Message-ID: <877e3t78l5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:xj7AKMOcOx1iVmqNlYhqDfu+Qwfh4/J3XxmGawkgU3zdfHIaaJP
 AGjmaFHEQKNokpT7SVtt9MfgSv5a+DtScWWTd7OdgNoIjBC2EqFwosEfxOkYvU6Vi7+S3+C
 Lb1uRLP4iO2Q0NR630oYn2K2MqFA0hXtVf+H2HHiYfp5vA5nsnHa/DjEC+WJHUWi6gd1SNA
 AD/hBELRbKSrZuetKZsBQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:TVcbxcgagsc=:V0hugtTYa0kQqw4vDHQsxy
 Ycw5oVu9V65Nx2BUN90YvfV6x55GW1fiq6VYHb+gXF8GiTAATrbo2M9hORqNYBNfrS50z4KY8
 vWuLofC9Dn78PnUshpvygr3wXZN5JdinVyIDWOY2CjJ/Fx8UOagh8RcYI+Lfp32vY1NbuhzHo
 CcSwLchq5xx/l29LfSjuXip5CnUc1JUIYfdr7FAmJT/GCltJjKgEoLzbdYspPoZga4ObpTwnd
 icOYy7blJhqTvJoDCeH/zyyHWt+HU+q290RFnWrPIsJ4uzVGFgi/CaOROHS+F2bYHAPDhXqeC
 1OCHFbAtYjhoVy4G8URH3VYtye2c3Q8+nM2RusEc7NE707PBayJBxhdUGyeUxcDDhl96KQxoV
 OFSmLdGUU50vMiuXceNO7wbCyja8x7SbxkP+EbKYATYB3g6dsRBkdozFipuGqrmRWys5Ibfzs
 iRpCHqKzdOuNA3D/a75ic2I8l2AhjXSSYx7zyLWaHfI4mYtTBcyOV8r84OMyN6tseiSeUpe7U
 /lBYqaQkrfS0lNC854URIQW/20b3K1fHO/ogFQzdJpBPnpiXwBt4x6kHoN5CNoHIn4HCd865V
 dLPDCYnOz+QmksQ/vPRHB3zknCh9TQ5I7Dl8gGe6rRPrnsX75g0C+XrvRUumEXgCPrPdYbuJ0
 K/piRfdpnTvhYXARHFHWShpY2hFJqleRh4AF7taI8tfyGOhjUfZoi416H5UsIZ/9lOfMLug6B
 XCig8CsM0PrRdfY1/PFLORuY97GVCHERYfR+DS4V9+akwTUbZQRWWFcRWmnsngQdB3poE/b+5
 u3jHFtChB2lUFwOp0DgxGHSIP4l1pbAX7MLc8G0s+3bJw7pPQQ26z5aZLQbLAALQ3BjhErW/5
 rl+43GvKc6Yya5TgAt7itVu/6QeoVHssKu6geEN6U2cikmfU6gAoL5mGjLvQob1EhpHf/FjtF
 pKVZgVDzDBlP390W4GIYudP7q9MoK2utgeiUfhqyVwiuLO4ztadF2bLKMCYt8kwsy8w6qozxd
 /C7CJ5lZJmuHpVg++B9dLTZ1QfJiJw7oxubEIehHgr26Pk5hT2teunGaBiY1XAGbsbiaO0op2
 4SLONZQzM9gsgKim4O3ssacvEdn4CNbZzHS2sJeVvj+bOZz/XMuT2I6TRdUcbhB2l5dG2N4XV
 5ZW8O4GrSjEHLs+Os4UaYoA0AmJP0B6EP8K7nw1QFV5jUKPX3bvXDOJXt9QjqUwrNm+QMKu8c
 fqNSXDc5n0L9wz29YqysPx4XWuQ1gfnUnv+Y+caMVDrIGutfBTfX5DqSm3Oo=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Stefan Monnier <monnier@HIDDEN> writes:

> I don't think you need the `advice--p` here since `advice--cd*r` uses the
> `*` meaning of regexps: "*zero* or more".

Ok, removed.

> > +     ;; `defalias' takes care of any advises so we can just strip them
>
> Actually, you *have* to strip them (otherwise you'd end up copying them).

Sure, I made that comment clearer.

New patch:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Fix-edebug-instrumentation-removing-from-advised-fun.patch
Content-Transfer-Encoding: quoted-printable

=46rom aab2cd47da230993e374d378c434989c98ce68ed Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Thu, 14 Nov 2019 17:47:51 +0100
Subject: [PATCH] Fix edebug instrumentation removing from advised function=
s

* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Handle
advised functions correctly.
=2D--
 lisp/emacs-lisp/edebug.el | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 5d52704410..d68ed966f8 100644
=2D-- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -4571,6 +4571,21 @@ edebug-unload-function
   ;; Continue standard unloading.
   nil)

+(defun edebug--unwrap*-symbol-function (symbol)
+  ;; Try to unwrap SYMBOL's `symbol-function'.  The result is suitable
+  ;; to be fbound back to SYMBOL with `defalias'.  When no unwrapping
+  ;; could be done return nil.
+  (pcase (symbol-function symbol)
+    ((or (and `(macro . ,f) (let was-macro t))
+         (and  f            (let was-macro nil)))
+     ;; `defalias' takes care of advises so we must strip them
+     (let* ((orig-f (advice--cd*r f))
+            (unwrapped (edebug-unwrap* orig-f)))
+       (cond
+        ((equal unwrapped orig-f) nil)
+        (was-macro               `(macro . ,unwrapped))
+        (t                       unwrapped))))))
+
 (defun edebug-remove-instrumentation (functions)
   "Remove Edebug instrumentation from FUNCTIONS.
 Interactively, the user is prompted for the function to remove
@@ -4582,10 +4597,10 @@ edebug-remove-instrumentation
        (lambda (symbol)
          (when (and (get symbol 'edebug)
                     (or (functionp symbol)
-                        (macrop symbol)))
-           (let ((unwrapped (edebug-unwrap* (symbol-function symbol))))
-             (unless (equal unwrapped (symbol-function symbol))
-               (push symbol functions)))))
+                        (macrop symbol))
+                    (edebug--unwrap*-symbol-function
+                     symbol))
+           (push symbol functions)))
        obarray)
       (unless functions
         (error "Found no functions to remove instrumentation from"))
@@ -4599,8 +4614,9 @@ edebug-remove-instrumentation
           functions)))))
   ;; Remove instrumentation.
   (dolist (symbol functions)
-    (setf (symbol-function symbol)
-          (edebug-unwrap* (symbol-function symbol))))
+    (when-let ((unwrapped
+                (edebug--unwrap*-symbol-function symbol)))
+      (defalias symbol unwrapped)))
   (message "Removed edebug instrumentation from %s"
            (mapconcat #'symbol-name functions ", ")))

=2D-
2.24.0


--=-=-=
Content-Type: text/plain


Ok to install?


BTW, I also wonder if we should enhance the command
`edebug-remove-instrumentation' so that it is able to reload source
files.  It could look at the SYMOL's `symbol-file's, collect these, load
the files, and only do what it does now for the symbols that are still
wrapped.  Could be controlled via prefix argument.


Regards,

Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 17 Nov 2019 16:04:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 11:04:45 2019
Received: from localhost ([127.0.0.1]:42412 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWN2b-0003TY-9O
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 11:04:45 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9773)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1iWN2Y-0003TK-U9
 for 38195 <at> debbugs.gnu.org; Sun, 17 Nov 2019 11:04:43 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3331A449EAD;
 Sun, 17 Nov 2019 11:04:37 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DC620449E9D;
 Sun, 17 Nov 2019 11:04:35 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1574006675;
 bh=AS+axoVWZkwe1Wh+RYdfO3zWTUiQYywS0gx7bsMpx1I=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=WkF2FmlF+9WNXNyAXzl7QkvDUb0arm/xJQ05If35dJ/YKFVDS6GYJ3hKE18/OeWwI
 NCDdWekRLmk09NKrVVNbxBe5oxg4M4+EXglRoezBGoVtH+qXU4fgINITJyF55FS+QL
 VExsoBvr35HHpz8k0nRHlnPnN3o/rTkxahY07jm3y6YyplE96oBVw4UyhqLlo1ViEL
 SN9Hu9fsu/ohfHBU+TS1wvSKDuhzNgNtEanI2mnuv4fm2MXmbXnyLNZx1Ybu18K5Xm
 aiL5K2uCPBEWu7NWtr+ykJOh9jmu9CVZaUaBlb0h06H4iQbf/8ygZvwiufR0XiPCY2
 FhAkvkA9iY7Og==
Received: from pastel (206-248-133-142.dsl.teksavvy.com [206.248.133.142])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9CE6112059A;
 Sun, 17 Nov 2019 11:04:35 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
Message-ID: <jwvzhgu7apl.fsf-monnier+emacs@HIDDEN>
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN> <87eey9z1mr.fsf@HIDDEN>
 <87o8xaoe6j.fsf@HIDDEN>
Date: Sun, 17 Nov 2019 11:04:34 -0500
In-Reply-To: <87o8xaoe6j.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 17
 Nov 2019 13:55:16 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.064 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> +  (pcase (symbol-function symbol)
> +    ((or (and `(macro . ,(and (pred advice--p) ad)) (let was-macro t))
> +         (and (pred advice--p) ad                   (let was-macro nil)))

I don't think you need the `advice--p` here since `advice--cd*r` uses the
`*` meaning of regexps: "*zero* or more".

> +     ;; `defalias' takes care of any advises so we can just strip them

Actually, you *have* to strip them (otherwise you'd end up copying them).


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 17 Nov 2019 12:55:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 07:55:31 2019
Received: from localhost ([127.0.0.1]:40447 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWK5S-0004ze-O7
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 07:55:31 -0500
Received: from mout.web.de ([212.227.17.12]:40861)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iWK5R-0004zR-D6
 for 38195 <at> debbugs.gnu.org; Sun, 17 Nov 2019 07:55:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573995317;
 bh=YuLMjX6oQexSZ0TCYXEemh6gAnHLEAh9wDXdodLR3C8=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=Au077k/+SojMmnWmqD0D6852ONgEywItD6UBMwZTJ+akmXR8QfVXgjjvf2YPxxVBE
 qYyMSsXPWk+0RJl9fMpLDIw/FekW8TpEDaOysuPW1gM+8n0A0/Lb0WzbA2+FQWEQS1
 +STVlV21WlWSpKF3vxXQTJlii9g4CRZ3DT33J9d0=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb102
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LnBDd-1hvuvo2cw9-00hJu6; Sun, 17
 Nov 2019 13:55:17 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN> <87eey9z1mr.fsf@HIDDEN>
Date: Sun, 17 Nov 2019 13:55:16 +0100
In-Reply-To: <87eey9z1mr.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 15
 Nov 2019 14:54:04 +0100")
Message-ID: <87o8xaoe6j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:/qfjcafOTOdi+UNIBKWBXR8R0rukmzhkV6Vzom6Gp7F/PHQTsWm
 GHMqgcNNl1FLCUiBSO+hTLe1xJnShy2kNT12UxxWlpo8M0/NDE0vQrEY508mh3toGQkm4js
 Y3SwTSSDEgZ/PsZInrLhJn26EvfP6lMxiGm/JHiUQnhrGMVmmvCLL/BZ4FuEWD2qWMlWzGm
 m7pgo1JkiHGQUquI8L+Xw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:aqSfGDMyFko=:U8SFrqM4Fh+Rdd7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/5YonNvq+TFw0+kDwF/Prg05zw21Kt4briA0s6M884N06j
 lgjUjQkKd4TQaJvMFvnfvitsTchXjii/dZ3qOU5DM3m7haFyuKuzwhxv7h8OlrLnwQCCnLOmE
 0c+OM2HPzFn6izhLk5QnarTPs7j3gjoQY9f8TPH0/LL+7M5t82i1fa5ITUlZU2xN4Pl3arvm3
 MUHl2y3DdyDiNNtgGhAazLWkMBR7xQcXdzNdsSdxQvVjDakcckGWkDsYolI4=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Hello again,
>
> I'm preparing a new patch with less quirks.

New patch: not much different but hopefully better understandable now.
I also added a comment about why we are allowed to just strip advises.
Also did some testing - seems to work ok.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-WIP-Try-to-fix-edebug-remove-instrumentation-for-adv.patch
Content-Transfer-Encoding: quoted-printable

=46rom 29380dcd30523e057d8fd45106f1d077e4212198 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Thu, 14 Nov 2019 17:47:51 +0100
Subject: [PATCH] WIP: Try to fix edebug-remove-instrumentation for advised
 funs

=2D--
 lisp/emacs-lisp/edebug.el | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 5d52704410..e0fcdf0f86 100644
=2D-- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -4571,6 +4571,23 @@ edebug-unload-function
   ;; Continue standard unloading.
   nil)

+(defun edebug--unwrap*-symbol-function (symbol)
+  ;; Try to unwrap SYMBOL's symbol function.  The result is suitable
+  ;; to be fbound to SYMBOL with `defalias'.  When no unwrapping could
+  ;; be done return nil.
+  (pcase (symbol-function symbol)
+    ((or (and `(macro . ,(and (pred advice--p) ad)) (let was-macro t))
+         (and (pred advice--p) ad                   (let was-macro nil)))
+     ;; `defalias' takes care of any advises so we can just strip them
+     (let* ((orig-f (advice--cd*r ad))
+            (unwrapped (edebug-unwrap* orig-f)))
+       (cond
+        ((equal unwrapped orig-f) nil)
+        (was-macro               `(macro . ,unwrapped))
+        (t                       unwrapped))))
+    (sym-fun (let ((unwrapped (edebug-unwrap* sym-fun)))
+               (if (equal sym-fun unwrapped) nil unwrapped)))))
+
 (defun edebug-remove-instrumentation (functions)
   "Remove Edebug instrumentation from FUNCTIONS.
 Interactively, the user is prompted for the function to remove
@@ -4582,10 +4599,10 @@ edebug-remove-instrumentation
        (lambda (symbol)
          (when (and (get symbol 'edebug)
                     (or (functionp symbol)
-                        (macrop symbol)))
-           (let ((unwrapped (edebug-unwrap* (symbol-function symbol))))
-             (unless (equal unwrapped (symbol-function symbol))
-               (push symbol functions)))))
+                        (macrop symbol))
+                    (edebug--unwrap*-symbol-function
+                     symbol))
+           (push symbol functions)))
        obarray)
       (unless functions
         (error "Found no functions to remove instrumentation from"))
@@ -4599,8 +4616,9 @@ edebug-remove-instrumentation
           functions)))))
   ;; Remove instrumentation.
   (dolist (symbol functions)
-    (setf (symbol-function symbol)
-          (edebug-unwrap* (symbol-function symbol))))
+    (when-let ((unwrapped
+                (edebug--unwrap*-symbol-function symbol)))
+      (defalias symbol unwrapped)))
   (message "Removed edebug instrumentation from %s"
            (mapconcat #'symbol-name functions ", ")))

=2D-
2.24.0


--=-=-=
Content-Type: text/plain



Thanks,

Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 17 Nov 2019 12:35:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 07:35:58 2019
Received: from localhost ([127.0.0.1]:40443 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWJmX-0004Yd-Sp
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 07:35:58 -0500
Received: from mout.web.de ([212.227.15.3]:54413)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iWJmU-0004YO-9d
 for 38195 <at> debbugs.gnu.org; Sun, 17 Nov 2019 07:35:55 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573994139;
 bh=PFM14yzq2zJFkalIajgfNPaANZj3RtJMDdoxmaDLJgA=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=YZA1sA46qza0VG7/Vh6mTlN8d/s6Y5HcMQQIIX3HkGBmscqz0v23ga5q6vSe4mnbX
 CBcNEfMW46z5IJfRIfRROxM/rNJAwu0Q7vv8hJf7SN/E5pKtwj6AwUV1ctLAryJfGx
 vjTecqud3dsphDINiriuxg2QWdsXWui9hcjhvnPI=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb001
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LyUy6-1hlidp02rO-015o6a; Sun, 17
 Nov 2019 13:35:39 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN> <87eey9z1mr.fsf@HIDDEN>
 <jwv7e41dpd6.fsf-monnier+emacs@HIDDEN>
Date: Sun, 17 Nov 2019 13:35:49 +0100
In-Reply-To: <jwv7e41dpd6.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Fri, 15 Nov 2019 12:30:54 -0500")
Message-ID: <87ftimof2y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:L5XIc/1LZGnhugmfHDc/ksEAOwbIdphNyoXqWNJn1GW34dtZBGF
 gEzngNKAUyn0zsT4HuWU3n4L6CFVqoAztTrQ7I5x5zaUNYjzJ6JwR192F3j3CpX7mVOLL9j
 kW26iyGcPJP2MiCq5GVZwHiWqcaKWsq2qLPlwsXZYn0uoW4YzTyeZ6vvbB7au6daBIuVqJI
 EhEDKn2yWRGKUqkNy0P+A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:R83/MhprNZo=:SfRf5PV7EMl8OsUpEIuW99
 EB+5FFZNW7Hwzq0Q3+WXSQzyxD43axDMl8BTqd9Z0v674chY5yYGITmuRqghygRsY5RiZDkPQ
 VTfQaMBK1qX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eh1+nTICfz6SgVZ/P4qj2kmy8mqLHd8zN
 QJQujB2fgvujS6nyN44VMxa0x3FvelesdJyTdcYpXE/6dJDyryltWiZVE2EFPQ+UCpSoLJnT2
 TYyw3CjOqRfy4RdGshzdvrj0N5bGN1c3cUfi4CWMJQVaQJweJKmtzwJh95Zc=
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> I'm not sure how to write the doc to make it more clear, tho (largely
> because it's just too obvious to me that it's the only way it can
> work), so if you have a suggestion, fell free to send it.

I think - although it would add some more lines - an example would be
best to illustrate that fact.  How about something like this?


  Advising macros operates on the defining expander functions.
  Example: to prepend a `debug' call to any expansion of `my-macro'
  you could do

  (advice-add 'my-macro
              :around
              (lambda (original-expander &rest macro-args)
                `(progn
                   (debug)
                   ,(apply original-expander macro-args)))
              '((name . debug-expanded-code)))


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 16 Nov 2019 12:25:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 07:25:11 2019
Received: from localhost ([127.0.0.1]:37812 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVx8Z-0007jg-N4
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 07:25:11 -0500
Received: from mout.web.de ([212.227.15.4]:60203)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVx8X-0007jM-PO
 for 38195 <at> debbugs.gnu.org; Sat, 16 Nov 2019 07:25:10 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573907103;
 bh=bXRZWFwqI3r1+RFK+fXfMF67QDwqKrgZqhqbdbcGqzQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=nBYc/iMBCX6WWMzUvq74+AWsbstofvRhXdIpbQrlhaNAkuUx4P1Pyhl+TKO0z3CY6
 hVVQ4A74eOmVECEO+aU3kLqUXEx1TprD8TiDUXpq59895MJl1pN9WZC9SCZs4udVEG
 GlL6wCNvNmEpKwV1tCkt9DLmDp9BusKXzfF2RaNI=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb004
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M7n5k-1hjMml0tnM-00vNVE; Sat, 16
 Nov 2019 13:25:03 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87imnm9z9t.fsf@HIDDEN> <87pnhuccbi.fsf@HIDDEN>
 <87v9rllggk.fsf@HIDDEN> <87k181wby3.fsf@HIDDEN>
 <87zhgwigx8.fsf@HIDDEN>
Date: Sat, 16 Nov 2019 13:25:16 +0100
In-Reply-To: <87zhgwigx8.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sat,
 16 Nov 2019 05:28:03 +0100")
Message-ID: <87a78wypn7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:8mS3Pb6hH4fu2vWSNF1ng9oAr0X2qdHmb3A///jfbtj1dNt395W
 MsRnODstgTicH2e5+uP9nTK6lZtCb7XItKQTAvU4ufL3Z+GsMaWetf5drzVI5MjOyq5adUg
 Fz1XBTiLzGKGHXGsRC1GLVS/eRXkoxZuJWBMUF7o2mBUVgWgbrVQnagWe5sf5yZ+SDRUlgL
 B10hkDtpK97GZtHqChwTg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:bSKSZIJNknk=:fIM4abafbkRZCvks8jAALm
 NdN4FtZP0AMbLa+wmC3/tW21InLEs5qT8fOskymdnX4UbpY5RK7jweK44anzfwFJM1A9sAVk0
 aJF01HzhtOh1CE3H04vvl3HV7SfEXWmD+yxSjxESVZD0eFHfNNEx93etPlCnr6aPnocyOkjyc
 rF3ClnS7kJvxvCg+9EWKOcwPPLNv5gd6qNjyPtlgzg3IZvDczg94q3vhEoesdsQUXUXq+qh6u
 L3LVaE/aeblGklp9aNllS9Iy8r2gFYc6NT1jG5neTnQ7eC5A4L/uzu+rDA8N8M1i+pV6kVrB5
 Jr59w8dVpJrJg9+Zp5MIieYJwgRoGbPUESYBhswKyWLSc/ZMx/KEN3tl/fL9Ojg6676NiV8Mo
 agId/iccn3+60NxbPpoc4LlxQ65gA6hBHFozE4y3daQREjtEexXqLUQ+TOZCfM6PH2gKAfxhK
 0xltp0oYeV+OvOhWxNWNPUvp8Wsj6DCXNXnB5Gd3u/sgehmJcX3/JKjUclFv4f9nLglL9dGwD
 oyUmxU9UCvRj9fpXN5Wzt4UFv12vTqIQWM8EKMPXQLpzvQsUOIQ22/+lb5tlghd/GGwMngdv0
 UmycfnfTddfhYXsNxULyl6pH9r20iCUZM2CQY8wDj4f1d9BkYEx45ny55oodhqk0AILnrkwTX
 nYKIo+HlRg/gdYEt4as1pOzG748Zb58chNfjA8VTpZmzlMBgsSZMGC80sTyrLa1Wi5lFOm7zi
 cLpJo9BzGJ4+j58JdILXb9hHgiK4WhmjLi45yVTcX5ULlD/5F/JD/3+p2JGWFEEM1IA3bHNCj
 6YrwcUL5UTXnfKpT0GNrsCXZCu6PTZz63isgK1K1IlTG36RYN0u2FilLRlLU9VH+xSwX0rJov
 ya9jTterNZsF76MR3lLthwxpuKgZPssRQ+mkKzJBUALdGBBdya9FqgcK2gRnsZPdsYRP6Af0d
 Epa3i5mtvq9vbAHo4n7OjB2QE4PFJmkt8dGbt7NKMgTUQYQpX3gjpjII4nvELuDfz9SfuYnBb
 oNSawMqcAaVjzCALPc9sV3KauGGk/IeW8tWXHNa2/cwTIHXa3xDsYNXPIlHjGwq3wkXqjFCWI
 33+JK/3cmSFo2oih3z3z6AT5VwzA/Ie0zuHR3ObvjNQBpFE0fk4TK+mkfxYBAwFWp+qyY0AbL
 5QDMi1qJ9VczGvWzdQTg5gHrRoP9/a+JEeUv+6SQMHSlQScnpdsUSrBY2j2UzmFrjtP2Gku8d
 1s7wM3o7/MRQYgqXNoecgA5xrnsce97xzDMP+DkpG/GEz2//xav/TmfQRkkY=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

>  I've now reworded the manual to make it clearer what it offers.

Perfect, thanks.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 16 Nov 2019 04:28:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 23:28:16 2019
Received: from localhost ([127.0.0.1]:37566 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVph2-00058U-2R
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 23:28:16 -0500
Received: from quimby.gnus.org ([95.216.78.240]:53784)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iVpgz-00058F-B3
 for 38195 <at> debbugs.gnu.org; Fri, 15 Nov 2019 23:28:13 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iVpgp-0005fT-Vt; Sat, 16 Nov 2019 05:28:06 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87imnm9z9t.fsf@HIDDEN> <87pnhuccbi.fsf@HIDDEN>
 <87v9rllggk.fsf@HIDDEN> <87k181wby3.fsf@HIDDEN>
Date: Sat, 16 Nov 2019 05:28:03 +0100
In-Reply-To: <87k181wby3.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 15
 Nov 2019 13:39:32 +0100")
Message-ID: <87zhgwigx8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Michael Heerdegen <michael_heerdegen@HIDDEN> writes: >
 Depends
 if you have the buffer at hand and how confused you got while > edebugging...
 I think I would always prefer the handy new command. Makes sense. I've now
 reworded the manual to make it clearer what it offers. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Depends if you have the buffer at hand and how confused you got while
> edebugging... I think I would always prefer the handy new command.

Makes sense.  I've now reworded the manual to make it clearer what it
offers.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 15 Nov 2019 17:31:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 12:31:12 2019
Received: from localhost ([127.0.0.1]:37332 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVfRA-0002WT-Gl
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 12:31:12 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63569)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1iVfR8-0002WG-HO
 for 38195 <at> debbugs.gnu.org; Fri, 15 Nov 2019 12:31:11 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A8FF4449D56;
 Fri, 15 Nov 2019 12:31:04 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6AF92449D47;
 Fri, 15 Nov 2019 12:31:03 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1573839063;
 bh=OMtqzgB8pZrCz8OueR9lgUwh2Kb97aKrj6+tj+rjVYc=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=pCni8Kj77ioQgSgaB3V24eR/qqPLIh0bL2r/94ZaNuAKO9xksT011kEfh+M2vF5hH
 gzg89UER/ng3AlrNIKxZQzNTMG65YZ+eIGFCrwaoku0ouFZXOmKQNoit56sjlMJfpr
 iIlNNrTgAsFh5VOlu8kgGstpKvyfwTQrTUVRgtxheEo+rUQQPVz/h206suXxyF2itp
 0WKDWUxtPjKYlc8Q0wQjzh9j9PyjImQJlztsFcDfrW+WOT2lKQdt/3FFBGBLnhWRZi
 ayhncYt8vUZf3hhO1ztbW8qNdjVf3yRheQeWo+9mY7LFLoRoIYP8d5kHBksNVEP/FF
 NuDI5iyiJKhIw==
Received: from pastel (206-248-133-142.dsl.teksavvy.com [206.248.133.142])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id F273A121200;
 Fri, 15 Nov 2019 12:31:02 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
Message-ID: <jwv7e41dpd6.fsf-monnier+emacs@HIDDEN>
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN> <87eey9z1mr.fsf@HIDDEN>
Date: Fri, 15 Nov 2019 12:30:54 -0500
In-Reply-To: <87eey9z1mr.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 15
 Nov 2019 14:54:04 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.116 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> All good - but it seems that when you advice a macro, you actually
> operate on the expander _function_.  Maybe we should speak that out more
> clearly?  Because that implies that everything you deal with is a
> function - e.g. in an :override advice you must specify a function - if
> you specify a macro the thing breaks.

Right.  Currently, this is just implied by the fact that the third
argument of `advice-add` is described as "FUNCTION", and that the
explanations (in `add-function`) of how this arg is combined with the
original definition all use `funcall` and `apply`.

I'm not sure how to write the doc to make it more clear, tho (largely
because it's just too obvious to me that it's the only way it can work),
so if you have a suggestion, fell free to send it.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 15 Nov 2019 13:54:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 08:54:11 2019
Received: from localhost ([127.0.0.1]:35857 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVc39-0005TH-2B
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 08:54:11 -0500
Received: from mout.web.de ([212.227.17.11]:49979)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVc37-0005T4-Dd
 for 38195 <at> debbugs.gnu.org; Fri, 15 Nov 2019 08:54:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573826034;
 bh=L1hnSFCUZx+CroeoA0IUm+lpNF7cbUcizxMrmD1uq00=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=kzV5pGHPtHTXziJa998gF2MeDtFsJSDw8kHUj8Tb2XpapsDaAH6v7bM/fQSfkRdRT
 yf7qDYiujjR3l95uw2N8hcWD4qmfV/YNilgNuP/l0EcDHtuH7T4GyDkSp2T3CngbUD
 xHljsZ5H52m1Eadke2A8AK+zZW4+Xd8cMUb4Lqls=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb103
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M4qWn-1hg7mp24r7-00yvcZ; Fri, 15
 Nov 2019 14:53:54 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN>
Date: Fri, 15 Nov 2019 14:54:04 +0100
In-Reply-To: <87imnm4315.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 14
 Nov 2019 21:27:18 +0100")
Message-ID: <87eey9z1mr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:d8NgfQWqckf7DT/Hrz6Tb4f9b5CxYiqcrADf/BXxsSJJr8bEkOM
 1/BP4vM7R4UPEEUPEzGB5azPlsWnITp7teS0A/UDwm/lo6zhLuJ6DbGB0F2oC8V1kWRSDNO
 G7kMph5nA09CrCCf3M75rJSKwuSGj1PnEgYqyqWJVEcxfJS0GUIfe63noXVHlmnr5P0BKpp
 djMNn1+/bmO9ua09weOUA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:HgYA/yX72Hw=:2yAbPmJ+NOja8YSiuL2UHr
 xJ7d3m2Xfv7ShW8ELrYczad4OQNKdEHeWX+dv6HkmtAyDSRsKJMcIIH/EFTqI7xtsEZS2et6k
 dvV4tz/G6ZeVpo1fS7YjDCQaI1PA9fBx6Z1IReXCM1nTKTXDmHH+Smg6pOpK/H78/u7TMBpgP
 EsfAdBcTJi4ex1IvnEoiwxx/5H8mWjZPWGj8cHEhkux3hlrOkv+kp+cz+hZkQGI+WeQIaTGEn
 tjl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OzjW7SsNHG8mLOtzX/zN+IQ7jXD8O+6WMlv0=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello again,

I'm preparing a new patch with less quirks.  I have a question about
advising macros now.  We don't say much about that, only this paragraph
in (info "(elisp) Advising Named Functions"):

   Special forms (*note Special Forms::) cannot be advised, however
macros can be advised, in much the same way as functions.  Of course,
this will not affect code that has already been macro-expanded, so you
need to make sure the advice is installed before the macro is expanded.

All good - but it seems that when you advice a macro, you actually
operate on the expander _function_.  Maybe we should speak that out more
clearly?  Because that implies that everything you deal with is a
function - e.g. in an :override advice you must specify a function - if
you specify a macro the thing breaks.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 15 Nov 2019 12:39:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 07:39:29 2019
Received: from localhost ([127.0.0.1]:35766 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVasq-0001iJ-Rv
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 07:39:29 -0500
Received: from mout.web.de ([212.227.15.4]:49295)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVasp-0001i6-FE
 for 38195 <at> debbugs.gnu.org; Fri, 15 Nov 2019 07:39:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573821560;
 bh=1hwUoh2E8zNmLLzqCW9cxzhzSGHD5BXW2b4Vr9rPhgU=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=kJgJf2UA/MZ8LiqedoKQPM3NLBIzkCn01vAB7FZ31qrK93+dgnX7+0g3mwDVrEptG
 jiq6SGEpUYL4t6RF9nvHP9oxpmJLorW6hKGTITv4FESSXtqQ4rIX19E7yUVNJfChX4
 EGaFifJ9oKkR2Ush6a003GvvJ/SrGdSMj0OB3LgA=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb001
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LtFEp-1hl59v0Yl1-012oap; Fri, 15
 Nov 2019 13:39:20 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87imnm9z9t.fsf@HIDDEN> <87pnhuccbi.fsf@HIDDEN>
 <87v9rllggk.fsf@HIDDEN>
Date: Fri, 15 Nov 2019 13:39:32 +0100
In-Reply-To: <87v9rllggk.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 15 Nov 2019 08:57:31 +0100")
Message-ID: <87k181wby3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:6/P/9jpfW/+DZuBV8KjBPq8nbyXHNtrMgvaqlbM0fTYj2WrsuSl
 qD9t1Y4XDmVP+f7GoGrM0LF4wqVEhwFGDB0jHvjsITgsuBLD+dgOHB5d7n5ByeesRxefnaZ
 UAQpcO3UxMgGKSyLHvuAHXP6xYMJHU/YSvvxriVDYI8mGhDIcZpGOYMXVyAFJHqhainr/AJ
 XnUv56u4r4T1Pd+ZmajXg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:RybzZpnm+Gc=:00GZIUmFazJdikQvaem1AJ
 AguwTvHD4YtFOLA46ujPbISC7UWf+3+MSLVAW2hfpQ+PuruubFgMH/ulbSOz2H49VlKaAxWo2
 7NejXXkUmEaHbQS1f/oQPgzzFMbi81VFFTWdZ9EhK1YYY6Pi5sRlrcenjS0Wyujz1ezx9YV7/
 1+04/E6XFtR0ZRYYrTt8p7pDrG/F4XrSTJdWqFUfgUof9qQOP6x5UhFN07sSsbfhe4vgFirCS
 IY6NJV7VFFE8QVrmSUpD/osNfV/CYPwnp/Fe5pj28P1p39mQ4qVP7xaKZHTj+cxYnyTgfy2vl
 +DzxUb7d9K/vMoCGV/90xo50h7J8hQAW31i/YO9BzU5DSUS3rCqgiJfB5MsGaZP2g7QXsC9nB
 kxx5a4/YM3xCRmi+nzH6ZChbyokWv+/h3Xrq97uXRRElVhbLmLaYB++JmVrxPUeu8D23s7HN/
 pUb7rRzupQf1qZPWf0oIrLIoMoypXKTU7EFWVHtxeMiyaE9qxYY0r56qXhLeZXSY+7DA3iA/f
 8qsp5182cFMo6z0M+FbsKUtAFJLvVc22JEe/+9vKUn2YSGMhWXwpab/kg2i7Wq09gpSajgtbc
 8WfT68omI9tkQ6gXOL1nsn86nWX8sDrNFIkSDi1K06K08bf2qm7ZLGGiqJdA3A9EG/E+V35Ls
 F8OZxXL3ZTpGWhhVaReIsgsF6Fx8+7B54IBfYAY/hdml2MZIjJiVeYJYuvABnCuMosMbcJTfc
 cBMeDGL5jtWF/9BlJu6KXa2Xx80eBj2l4uLRjnNixNyt8NAq4aOx20n8iq97zbRnM2+yLVaEp
 c53ZtIgH9KUoOtTLXS8+JTJgNYNTIsLFDls65UpR9/0xuqWWT3PFq+TkmwaTKCD5JlZAfNM8K
 hp8KteXxoj4i8oAu8zH31aTn9pQMk+t8V2mff2UgMdyUT2YGuYqX1vIFuIkeremWpcDTtfMYf
 VIENceycNP5WaqCPQ8XNcDrZqxixweJD3gAikRXJgJ0HL5o2hVckIXVEHiPGApn1nFZxWf7FX
 OM6/A528pomWYuGkDwVMejqqi7LkofFj/9w3TZvjOSjZew/LtSyjRR/RHtT3acf//DBrBvWql
 Px/bZQXm3Dr89v2DCkQxe8lOHkuhSmFgygDdiUya5G6Dx9Duc1faBfgKKKX84uYcZWKl0T9E6
 P1qoM07ed9f/dHfiHBKi5USfcFW+c8cX4e3fL3zKeZB07yqlJDR9oeiGVgzwaht7OJtoa4Cgr
 c6KO18WLnsgJmuekItGob102bqI2/mY+S9q9VLN/28/TJmcaU7cxoWwijESA=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> The previous paragraph says:
>
> ---
>   To remove instrumentation from a definition, simply re-evaluate its
> definition in a way that does not instrument.
> ---
>
> So while the new command can do this for one function, the salient
> feature is that it can do it for all functions, too.  The
> re-evaluation thing is still easier if you just want to do it for one
> function, I think?

Depends if you have the buffer at hand and how confused you got while
edebugging... I think I would always prefer the handy new command.

With one exception: the new command will never give you compiled
definitions.  If you want to use compiled code for the rest of your
session after you are done you need to reload the elc.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 15 Nov 2019 12:34:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 07:34:16 2019
Received: from localhost ([127.0.0.1]:35762 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVano-0001bL-3q
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 07:34:16 -0500
Received: from mout.web.de ([212.227.17.12]:54757)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVanl-0001b6-HG
 for 38195 <at> debbugs.gnu.org; Fri, 15 Nov 2019 07:34:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573821246;
 bh=8XQ+orUDAWKQWEPHMsaOhJRAPAe++/aAZLNro9kywv0=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=Aa7oDN0OWYnBfdJxG+4+drK1SXPRDvkXLWeBsRWD4ZKL5+Yg3h4/YJt5sPdsK1De8
 bZhfqJeZtydlh6wsNWHXUqy0Bnry3wqqFYfmwwfqxwjMxap6yT2nCx2Jk7z0gQQhPu
 HRPsn/Iy55ypxB4BUzU27Ye3YIws3fCR5Sv49rac=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb103
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LdVza-1i4XVM1AAM-00insK; Fri, 15
 Nov 2019 13:34:06 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87r22ajh22.fsf@HIDDEN> <87pnhtlg6f.fsf@HIDDEN>
 <87woc1wd86.fsf@HIDDEN> <87h835jpxr.fsf@HIDDEN>
Date: Fri, 15 Nov 2019 13:34:19 +0100
In-Reply-To: <87h835jpxr.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 15 Nov 2019 13:15:44 +0100")
Message-ID: <87o8xdwc6s.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:Lus5Ivfcwl00i9GztysQRszW7rEvKFN2zaTbIULUnrRck5ho724
 20hPdyFSM3hWHYQV7yRo1BA5gQKi2Jwj1goP/kJQSb+9r8ftNDr4i6p91NtC0tkU0xYPNxW
 PNIQyIbBdlXBkTPRIX5Isgb35SxErANWDKGQqr0v8hRQPc2jT0s4NYHwiQ5nwN4AnNZq10H
 QUcn2KBu+rK9O+ArNt1ZA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:eZ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Ox
 JoRLohgWjTlmUGKvg3kZ7lN4tOql1mdjOnVD6Iwykr/K1a7P//2FDFFLzz12Eb4KwCAmx070L
 0vIEcyCsvWyQ4mrNyCx6OdA94RLMzMiadxkLf74H1LyaESoFRipojemoTwC7bOPcXfuyX6Y09
 nvszBizafv5TacErFz1KzT/w039SCXg6iAjb8U/awvUReSJav87VHu+T4suTjoD+JpJ1P8YWt
 HcyOLazyYvWfXIkNU7LBV7uQNQrBWWAV/c3+F3vKxcW1W+mO9EOSV8+YN0YE=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> > You don't remember all the debug specs in macro declarations?  These
> > are all for making edebug work with these macros.
>
> They're mostly for making edebugging functions that use those macros
> possible, aren't they?

I think you are right: instrumenting the macro let's you edebug the
generation of the expansion.  The purpose of the edebug spec is making
edebugging the generated code possible.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 15 Nov 2019 12:15:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 07:15:58 2019
Received: from localhost ([127.0.0.1]:35740 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVaW6-0007bg-6T
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 07:15:58 -0500
Received: from quimby.gnus.org ([95.216.78.240]:42186)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iVaW3-0007bT-8w
 for 38195 <at> debbugs.gnu.org; Fri, 15 Nov 2019 07:15:56 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iVaVt-0005qE-No; Fri, 15 Nov 2019 13:15:48 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87r22ajh22.fsf@HIDDEN> <87pnhtlg6f.fsf@HIDDEN>
 <87woc1wd86.fsf@HIDDEN>
Date: Fri, 15 Nov 2019 13:15:44 +0100
In-Reply-To: <87woc1wd86.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 15
 Nov 2019 13:11:53 +0100")
Message-ID: <87h835jpxr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Michael Heerdegen <michael_heerdegen@HIDDEN> writes: > You
 don't remember all the debug specs in macro declarations? These are > all
 for making edebug work with these macros. They're mostly for making edebugging
 functions that use those macros possible, aren't they? 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> You don't remember all the debug specs in macro declarations?  These are
> all for making edebug work with these macros.

They're mostly for making edebugging functions that use those macros
possible, aren't they?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 15 Nov 2019 12:11:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 07:11:51 2019
Received: from localhost ([127.0.0.1]:35732 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVaS7-0007VR-49
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 07:11:51 -0500
Received: from mout.web.de ([212.227.17.11]:53011)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVaS5-0007VC-Ak
 for 38195 <at> debbugs.gnu.org; Fri, 15 Nov 2019 07:11:50 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573819900;
 bh=qgRxlViibwaMtsJ9EcYws6Yo74NWqD/ZCtnrpBHstkE=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=nuwtoFq7Gpb4jwE7Y2CxtWpqTwFMogvClsW0/CvI/efRQD0pz0ewai0kWLcBFaVB8
 1G8dz+v1AqnwtJ6kdWzEXeXD0AfdZaTCOydpqxQoPi8RHtbrbmZjWZkrJKimBM9MXx
 vY7wsfAiz426skEgF3cGPkTVWLiZYGmOLvNddBWM=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb103
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MDgDS-1iexYw2F8Y-00HAZf; Fri, 15
 Nov 2019 13:11:40 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87r22ajh22.fsf@HIDDEN> <87pnhtlg6f.fsf@HIDDEN>
Date: Fri, 15 Nov 2019 13:11:53 +0100
In-Reply-To: <87pnhtlg6f.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 15 Nov 2019 09:03:36 +0100")
Message-ID: <87woc1wd86.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:7GTfvBoD6NIcUOCWMPBnO6Wf6qBQJpMKjY+Li33ykEH8RUyVA9H
 5YaZSwUYolGIDXD2oeKXF3QUkC/sZK5QG+YUk5xMSBjAWen1xOPjk9ryroGVfJw7oBfIala
 e1irm789rQrVtwRrmgi6+/iK1+v+NV/BvXnJcWV31tpZKs4ywYjFyd78QRGOPgPKnXO+okP
 74OLDqVHV4FOkax0GCqkQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:AoOFHf7bKoc=:8yjIEz2OkHNQHHnE3qo4xo
 YQLUQ7uHk15jt5Vi/oMUAZCQ59ypzzFlEbfNcgipTq+b8mb2pMOUEqjhJnTekUVLu2VqopTTG
 HBoOr0QhapereqdgX2Q96Ny7IOAHVYTXRVwxjHIm54oTe6HeWO0kQjSxwEHmyx74f6/FIAogE
 9F7avhyKM0qsVRMgVm5MRkidAyDLtMUECbEt0iXC5p4OMYSdSGFl3MOufoBPNo0e1OAbmc1Sd
 MiwJsV5b8mrHSJ8H1+Y4PQepFHKlMIpN8em20vZMhqqgiaAYc8a8gCpExBeSbR3qcT6OdRWQd
 4EL0FlJxsqfeO1Jlpr17imDl4kyRQLQENL6Nzm/QRLmwlt2KnOccwyxHFVf2inEaIZA6c9Bd1
 9D74yi/3bgZwPd1jqSROzkfxeW8ux3Lh0dDRKAjxZRfU6q9MUgc5rIVxUtIBL62pRRFn9gnqJ
 xE9CZN6PteUDEHP5ciC0yWcrJBlfDcrlN8P6ybzaZqoqEIGgJS40EqmX4MkqXHsGtdfM3fh0p
 XCYlml0csD3IFDrHthK9BqFPLJP2Dl40ekVJTWqcfwvJAFQ7aOoo2M6R6DBiit5ad5CRjJhWC
 j0q7ZVU1jXkwHASurnxdOo8VE1ipRhV/tnEBVqeWsC7dKNlF78m0MW2gFaMv/Lo04Dav6LYXq
 kzvGjmAH8brZuue8vxWSvEPFMau4JIzZQMC5GCCllct7pdvVfefbDBKEZ5Gz22atG4fRaqrya
 btVarQ0AcAzCvNCdY6bXa/nPBuSaYGhzu9pMY70j2q/LEYQhXG+30k0yne9rRDdUB0HLTTs0e
 3UQHxSdLzy17UT5OY5d6oUqSoTstCVXo/PRc9hxB56/Vlq35XSWvsD5fA46VbZrw4biipMeHB
 ap18EZReWO0cDRy43pRP6ZVgQWuz3GgNcsjA6+PhLJnS6nsRQtTuwqqe+NhN8r5j+ruarNVEo
 h3JUjQAzbW1AfWZ6zDuwJQD0KV+Nn2OuotgSK9o+pbhHIF7JnoyoNBV0TipO7PrHerUVhvDZq
 9dqfQmLVKBuK3pT9fIThr7YewGzjPqg01evUvcBMpCJo0swqT6wSFP/wzDs2tBrsNWhBFUso8
 9dhFkS/CO79ZMDKrhrHNLAozZeIoGfJIHaXJye1SfblLrCkAh/Amns0ijuztjF0Lmb0pnX/Sz
 JcTfksJ2w6PmkJNZzZMY5QZyeOzgOSeksy65sgNb+qMZ8VeZkm4rxTi39hW8lG+gnCDBgP60+
 tOqvXTaoQMB9FIzzAdcGKAE2PG9yEcnXhl6NK1V3J5uNwiN7gEbOWJirVrkY=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> Hm, I didn't think about edebugging macros, but I guess that's also
> possible?  Let's see...
>
> (defmacro foo (x)
>   `(+ 1 ,x))
>
> (foo 2)
>
> Yes indeed.

You don't remember all the debug specs in macro declarations?  These are
all for making edebug work with these macros.

> I've now adjusted the command to also do this for macrop
> symbols.

Looks good, thanks.

> > What is the correct test here (are there even more cases to consider)?
>
> Hm...  Are there more cases?  There's special forms, but they can't be
> edebugged, I think?  I can't recall any more function-ey things...

Autoload functions are unlikely to be edebugged.  `defsubst's -- for
source code they are like normal functions (i.e. covered).  So let's
assume these were all cases to consider.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 15 Nov 2019 08:03:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 03:03:52 2019
Received: from localhost ([127.0.0.1]:35546 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVWa5-0003vu-RK
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 03:03:52 -0500
Received: from quimby.gnus.org ([95.216.78.240]:39292)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iVWa2-0003ve-Bd
 for 38195 <at> debbugs.gnu.org; Fri, 15 Nov 2019 03:03:48 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iVWZt-0003hR-Af; Fri, 15 Nov 2019 09:03:39 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87r22ajh22.fsf@HIDDEN>
Date: Fri, 15 Nov 2019 09:03:36 +0100
In-Reply-To: <87r22ajh22.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 14
 Nov 2019 22:15:17 +0100")
Message-ID: <87pnhtlg6f.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Michael Heerdegen <michael_heerdegen@HIDDEN> writes: > when
 testing the advised macro case (AFAIK macros can be advised) I > found that
 `edebug-remove-instrumentation' doesn't handle macros at all > because the
 `functionp' test you use fails for macros. [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> when testing the advised macro case (AFAIK macros can be advised) I
> found that `edebug-remove-instrumentation' doesn't handle macros at all
> because the `functionp' test you use fails for macros. 

Hm, I didn't think about edebugging macros, but I guess that's also
possible?  Let's see...

(defmacro foo (x)
  `(+ 1 ,x))

(foo 2)

Yes indeed.  I've now adjusted the command to also do this for macrop
symbols.

> What is the correct test here (are there even more cases to consider)?

Hm...  Are there more cases?  There's special forms, but they can't be
edebugged, I think?  I can't recall any more function-ey things...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 15 Nov 2019 07:57:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 02:57:41 2019
Received: from localhost ([127.0.0.1]:35538 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVWU8-0003lX-M8
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 02:57:40 -0500
Received: from quimby.gnus.org ([95.216.78.240]:39244)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iVWU7-0003lM-Lz
 for 38195 <at> debbugs.gnu.org; Fri, 15 Nov 2019 02:57:40 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iVWTz-0003dq-RE; Fri, 15 Nov 2019 08:57:34 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87imnm9z9t.fsf@HIDDEN> <87pnhuccbi.fsf@HIDDEN>
Date: Fri, 15 Nov 2019 08:57:31 +0100
In-Reply-To: <87pnhuccbi.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 14
 Nov 2019 23:39:29 +0100")
Message-ID: <87v9rllggk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Michael Heerdegen <michael_heerdegen@HIDDEN> writes: > But
    could you please update this sentence in "(elisp) Instrumenting": > > "If
    you want to remove Edebug instrumentation from all functions, you can > use
    the ‘edebug-remove-instrumentation’ comm [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: ingebrigtsen.no]
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> But could you please update this sentence in "(elisp) Instrumenting":
>
> "If you want to remove Edebug instrumentation from all functions, you can
> use the =E2=80=98edebug-remove-instrumentation=E2=80=99 command."

The previous paragraph says:

---
  To remove instrumentation from a definition, simply re-evaluate its
definition in a way that does not instrument.
---

So while the new command can do this for one function, the salient
feature is that it can do it for all functions, too.  The re-evaluation
thing is still easier if you just want to do it for one function, I think?

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 14 Nov 2019 22:39:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 17:39:28 2019
Received: from localhost ([127.0.0.1]:35372 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVNlv-00072P-SK
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2019 17:39:28 -0500
Received: from mout.web.de ([212.227.15.4]:38005)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVNlu-00072B-Cf
 for 38195 <at> debbugs.gnu.org; Thu, 14 Nov 2019 17:39:26 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573771158;
 bh=Hp2rZtowQ8dwdI3AhkvU/pbtCIkP7yVEM0naSsMk7MA=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=WOL/wTNZO3fIS98D/4p5wxwZx3rgW9MfFd5CHi4aTyu0BYugKPdkdrMTpExqpP9lQ
 y/j2XGVKn8T0teqDlCVM5+HPgatBRmkQcVmVPRduvQDvQGbgTnNXa50nPXyiqT1KLI
 cooejLWgZkDPyjOr1qMEA8QCfISpJlksrIP/iMVI=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb002
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Mb8d1-1iBnO12wQd-00Kkwz; Thu, 14
 Nov 2019 23:39:18 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87imnm9z9t.fsf@HIDDEN>
Date: Thu, 14 Nov 2019 23:39:29 +0100
In-Reply-To: <87imnm9z9t.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 14
 Nov 2019 17:51:58 +0100")
Message-ID: <87pnhuccbi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:vj1gHchy2HXbvp2FBvHNqS3VsF6zmfjJaqhc4SM8l3Phvr79dNv
 unOB6+eLiYvYjegntBoM95B3+smz4ohLSdQsBn/zZdcB6gfABXcbqay9cGAbtvHOR6wTlpq
 1ithlYHhPz+EQYiCwuUN+7L7I9PBf8Oa/WQWwiCiOBZWL+nNCYGSNeHVdhNh3lxlfPj3V6E
 t8ncIsAiV8bcWOevcGnFg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:dGuIXR6UQJQ=:ZyPyLNgvIb+hRs2TRpJq+6
 IATOOXEvzOaXSElxO+W18x+iCFMw3doKD9Ma0kc62cyYqNL8oxA25faIVfIhScZ/FE6GuS5fN
 bBHKYlcKcCaEDNV5+UfCpFuUaDZ3PPVGIu/W1vLoV3aFuGH8qZStSX4WSNiDFtOtp2qxIDAN5
 jxUM9a+23xx4N/LjtSByyixTUMOIzRGzCsON4IW+ID8vUkWId11eU/8MsF4QCNq3cE3tAWqUP
 Xy3JjYw/cpaCYa1JqiZ+uEhRsUAQ5DlSuRevbQPpnv26TN4GJGhOULwLtHqqJTpfZIN2nVrjx
 mQ/Ta+eDXU4BVSlPl06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s.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> > > the user interface for edebug-remove-instrumentation could be
> > > similar to `cancel-edebug-on-entry', i.e. it could prompt for a
> > > function to remove instrumentation from, defaulting to all
> > > functions.
> >
> > Makes sense -- I've now done this.
>
> Thanks!

But could you please update this sentence in "(elisp) Instrumenting":

"If you want to remove Edebug instrumentation from all functions, you can
use the =E2=80=98edebug-remove-instrumentation=E2=80=99 command."

And when this works reliably, we can also say that
=E2=80=98edebug-remove-instrumentation=E2=80=99 is the preferred way to rem=
ove
instrumentation I think.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 14 Nov 2019 21:34:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 16:34:04 2019
Received: from localhost ([127.0.0.1]:35343 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVMkd-0005Uk-VP
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2019 16:34:04 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61486)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1iVMkb-0005UG-Ok
 for 38195 <at> debbugs.gnu.org; Thu, 14 Nov 2019 16:34:02 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 171A78362A;
 Thu, 14 Nov 2019 16:33:56 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 822F8811CF;
 Thu, 14 Nov 2019 16:33:54 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1573767234;
 bh=czmGWajiObaKsWff83XK6VLHwT0qHdV2KXJiWSGjX3E=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=RU/GAjGMFjIyf/zYvFqNE5RNN6EoqMWnjb2BXutNEIqFBClXxVU58pYHsGYinwliB
 5LxRPQkxyi9HGd4k0zwQAabli7yuJh7+M5GJXY6VB/Du11KObcyng8aIGvLY01658K
 JBd0qJRmSsSp3vV8FNGkyBYUu1mzIR0TQYHt2+KLGpx46cg68G2NrzRE6UWydf6hCS
 u8OYK649eyMbvwmk6U0pC4nkVEXLO/y0iTvxMpE39H5UP3bldFo/FyTWEAw5paWmGc
 NcTOtdkbluChNFD3xaxes1N/LZJMkFowMh0HIi5Kt9YFN1dqUlAPoD8kdt4M4Mf7LO
 5Fgd3kSgxHsDQ==
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1E829120735;
 Thu, 14 Nov 2019 16:33:54 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50;
 `edebug-remove-instrumentation' doesn't work for adviced functions
Message-ID: <jwvr22a5eli.fsf-monnier+emacs@HIDDEN>
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
 <87imnm4315.fsf@HIDDEN>
Date: Thu, 14 Nov 2019 16:33:52 -0500
In-Reply-To: <87imnm4315.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 14
 Nov 2019 21:27:18 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.024 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Can't we just use `defalias` rather than `fset` (and that should
>> take care of calling `defalias-fset-function` when needed)?
> That's what I want to know too!  I guess we can, but I thought defalias
> would change the source file association as a side effect?

I don't think it would.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 14 Nov 2019 21:15:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 16:15:20 2019
Received: from localhost ([127.0.0.1]:35333 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVMSV-00053F-Us
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2019 16:15:20 -0500
Received: from mout.web.de ([212.227.17.12]:56887)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVMSR-00052u-9I
 for 38195 <at> debbugs.gnu.org; Thu, 14 Nov 2019 16:15:16 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573766106;
 bh=xQZJadCd6V/G03c1laSt2Gk9to6aivFiwqBGZBJmfBU=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=WWG98hdaHu7lIXtgp5YLBtHZ4aaCSHVnAYNln2mSI3+C8NnAhuQ814VaPS0k9eXJt
 sThps9FFgZXcZUZPFLI+bA3av0rtgO+mjhFn4DG5XUv+/Tjobp86FwQPI5rX1b3jsp
 spIDFujFkVJ3s232fm7F1SpMqg2mLgZ2etMnoCxo=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb101
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LmLoU-1hwZbM2Wfa-00Zw1T; Thu, 14
 Nov 2019 22:15:06 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
Date: Thu, 14 Nov 2019 22:15:17 +0100
In-Reply-To: <87r22brq3b.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Thu,
 14 Nov 2019 06:20:40 +0100")
Message-ID: <87r22ajh22.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:eqMnXvteb4Cm0SKASOIVpmkNMAf/h9z5k+1ocT0E6vjVUyQxBbv
 sAjNcv/45Rf7Gk0zKIVQK4AmU8eKTDKIq28k81uK9ZJSW+ySI3RxUWkSg/Xp4GKtV6t3oQs
 mWlKagpuULwnsTWyVhAQ4rA8shLHnqvjSfXG26sKEU/uoilvP1DDuRmWiXLQ6r5dr2iDg58
 ggJQg1biYfrjxBTjjvRPw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Rw+/ZPWyxcI=:LGyXQPM1JrpNxvcK//isbg
 a4ojXlp5VEDI7iUsNcUA64ccDc5d1RAH0nf2Q1fdsl+x9fOsJprd7fV9jA8MLv9SeoxhrlYhf
 60O3ejULX+Ku3euydZDqWyszqRqPlBy7QG/SM6Hrp+qiSoyi/Un70QQHK+oyo8EmpB4tY2LvX
 Xhsw0uXkv/8UQvWNTy0qet+08mXhHCteqE/RQfxeSrmKXdRb4wihD4caqNxquhOuH0voVJ7tC
 l/keyQzmiECm4utcfV9LQnW/Sxzz4HhW1ftXzV+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X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Lars,

when testing the advised macro case (AFAIK macros can be advised) I
found that `edebug-remove-instrumentation' doesn't handle macros at all
because the `functionp' test you use fails for macros.  What is the
correct test here (are there even more cases to consider)?


Thanks,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 14 Nov 2019 20:27:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 15:27:26 2019
Received: from localhost ([127.0.0.1]:35299 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVLi9-0003ua-Mz
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2019 15:27:25 -0500
Received: from mout.web.de ([212.227.17.12]:49011)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVLi7-0003uK-KT
 for 38195 <at> debbugs.gnu.org; Thu, 14 Nov 2019 15:27:24 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573763227;
 bh=Yli3OUSLxRHcbEup7QQ4ylxR8G+3+gpp2iVflsZ5FjQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=GPdWfuM6Rn4DEZoTVDLI5rSyCXVQYD84WPVdy988yLrtFRvNtQE9h2ojeIUtj1m9c
 TfakunzgdlZajMLUEd9uKZdiKowwMlfY9MMPn9t8kG6Il+eWkOQvJyptq7xUKHq72a
 MY/7Z2jeRO0eBbBQk8bsWJlWE+SY1SzCHohDkDTQ=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb102
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LmcjH-1hwI8W0F5H-00aBH7; Thu, 14
 Nov 2019 21:27:07 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN> <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
Date: Thu, 14 Nov 2019 21:27:18 +0100
In-Reply-To: <jwva78y70fq.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Thu, 14 Nov 2019 14:08:24 -0500")
Message-ID: <87imnm4315.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:Z7JiRSVY0XcgjQ6IuBVuy6LPeON59YpUnmgrjp4qC6cbSOopA+F
 Y4W/6LsDQmGsff9I9OwqCpdpgfku/LN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xUaeiYzV/nCETc0DpY2/iI/wgW3bXBjubSqCe2QpkgheedrmC
 Aiha2gIMWRFcg8Cx55aptjWoEZfkjJPYZ3wAOMSugiqgL0yseMON8aQ9TJQ41pjmCjQVEqlWL
 R6vPYGdJN30uZoS2yoXW+dkHQhn/hyhkLCY7TmRMtCa3gpINc75+nGMMLzqZ2+FCK8YJ5ICAR
 Pd74GLLBZn7WoC4sa+2VEZa5gOda9kBhrTyrAmtY1D8YDzrHFaQJm57U0Va3NVgXKfqy9b/xc
 pQzyR7J1G/Lw7cC+evl7PqjgfXyrVrJHwFS9zQeT7aR8hSX5MPCx2tEE7mbigdN2JF6rQXtu/
 T21SfOb9tczGBplL3xYYqhzqXCQ/tBf2K0AVWd8Rms8POpbqbU68zZtbBGp34Fb7J/yMVuQSW
 2imObB025VXwiswM6nH05cUXpd6vG1G1a0Mz87s1K3BEpG4nhQUVh0luEEE0=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> > +(defun edebug--advised-p (symbol)
> > +  ;; Non-nil when SYMBOL's `symbol-function' is advised.  The non-nil
> > +  ;; return value is the unwrapped base function if it was wrapped,
> > +  ;; and the symbol t else.
>
> Do you really mean "advised"?  It seems that this tests whether the code
> is *instrumented* by looking past the (potential) pieces of advice.

It tests both - sorry, a bit ugly - for the sake of fitting into the
existing code.  As a predicate it tests whether the thing is advised,
and the return value is the unwrapped original function when it can be
unwrapped, or t if it can't.

> > +  (pcase (symbol-function symbol)
> > +    ((and (pred advice--p)
> > +          (app advice--cd*r orig-f)
> > +          (let unwrapped (edebug-unwrap* orig-f)))
> > +     (if (equal unwrapped orig-f) t unwrapped))
> > +    (`(macro . ,(and (pred advice--p)
> > +                     (app advice--cd*r orig-f)
> > +                     (let unwrapped (edebug-unwrap* orig-f))))
> > +     (if (equal unwrapped orig-f) t `(macro . ,unwrapped)))))
>
> [ That's pretty ugly.  I think I'd move the `app` and the `let` outside
>   of those patterns and into the code of the corresponding branch.  ]

Hmm, that's what I had first, and I find this better...I guess nobody
else does, so I'll do what you suggest.

> >    ;; Remove instrumentation.
> >    (dolist (symbol functions)
> > -    (setf (symbol-function symbol)
> > -          (edebug-unwrap* (symbol-function symbol))))
> > +    (if-let ((advised (edebug--advised-p symbol)))
> > +        (unless (eq advised t)
> > +          (funcall (or (get symbol 'defalias-fset-function) #'fset)
> > +                   symbol advised))
> > +      (setf (symbol-function symbol)
> > +            (edebug-unwrap* (symbol-function symbol)))))
>
> Yuck!
>
> Can't we just use `defalias` rather than `fset` (and that should
> take care of calling `defalias-fset-function` when needed)?

That's what I want to know too!  I guess we can, but I thought defalias
would change the source file association as a side effect?

> That's because if I have `foo` as an alias for `bar` and I advise `foo`
> I don't want it to affect `bar`: if you want to affect both, then you
> should advise `bar`.

I hoped it would be like that.  So after advising `foo` the
`symbol-function' of `foo` is no longer a symbol, so there is no need to
call `indirect-function' in my change.  That wasn't clear to me.


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 14 Nov 2019 19:08:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 14:08:36 2019
Received: from localhost ([127.0.0.1]:35238 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVKTs-0008WU-AA
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2019 14:08:36 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44063)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1iVKTp-0008WF-TR
 for 38195 <at> debbugs.gnu.org; Thu, 14 Nov 2019 14:08:34 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 430FC449CDB;
 Thu, 14 Nov 2019 14:08:27 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CC249449CD9;
 Thu, 14 Nov 2019 14:08:25 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1573758505;
 bh=RzC2lX14fb8r7j4F22Pl7kDkgiqcEgTvJW8PlX4kg50=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=QrgIHmpttPfkKjThv0WL8Jdy+6Y8hLuibRkAiCaTxunOfKZ3BVRIcCy3Z7t8t5ury
 rVy/KvaEzQjxw7lqKGY5VO3y9m3+k7AMmxnr7tueGq7A8Lubw0qaSxzJ+YEH9ISxB/
 hGvPzP58HkUiSJQ+CqiHCXmcDnsmniVZNbT+dQZdw1jJxZgEemGsuBbcXaQIcaCkuE
 69OEDU+rXH6JA4YwusqWx26RKLlJ5AGzIds4SoUnKzY20DRKDDLNeK7Y//tfkQgyD/
 1+up4Cm00ii72wH+IzW2bMyhczN5hdOVrL8tagmUYU1vVLFULU29nEZvGe+2IDyyx0
 PK8IfOIOwP4Cw==
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9AF59120850;
 Thu, 14 Nov 2019 14:08:25 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50;
 `edebug-remove-instrumentation' doesn't work for adviced functions
Message-ID: <jwva78y70fq.fsf-monnier+emacs@HIDDEN>
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
 <87eeya9z3z.fsf@HIDDEN>
Date: Thu, 14 Nov 2019 14:08:24 -0500
In-Reply-To: <87eeya9z3z.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 14
 Nov 2019 17:55:28 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.091 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> +(defun edebug--advised-p (symbol)
> +  ;; Non-nil when SYMBOL's `symbol-function' is advised.  The non-nil
> +  ;; return value is the unwrapped base function if it was wrapped,
> +  ;; and the symbol t else.

Do you really mean "advised"?  It seems that this tests whether the code
is *instrumented* by looking past the (potential) pieces of advice.

I'll assume the above should say "instrumented", but if not, then
disregard the rest because I'm just confused.

> +  (pcase (symbol-function symbol)
> +    ((and (pred advice--p)
> +          (app advice--cd*r orig-f)
> +          (let unwrapped (edebug-unwrap* orig-f)))
> +     (if (equal unwrapped orig-f) t unwrapped))
> +    (`(macro . ,(and (pred advice--p)
> +                     (app advice--cd*r orig-f)
> +                     (let unwrapped (edebug-unwrap* orig-f))))
> +     (if (equal unwrapped orig-f) t `(macro . ,unwrapped)))))

[ That's pretty ugly.  I think I'd move the `app` and the `let` outside
  of those patterns and into the code of the corresponding branch.  ]

> -           (let ((unwrapped (edebug-unwrap* (symbol-function symbol))))
> -             (unless (equal unwrapped (symbol-function symbol))
> -               (push symbol functions)))))
> +           (if-let ((advised (edebug--advised-p symbol)))
> +               (unless (eq advised t)
> +                 (push symbol functions))
> +             (let ((unwrapped (edebug-unwrap*
> +                               (symbol-function symbol))))
> +               (unless (equal unwrapped (symbol-function symbol))
> +                 (push symbol functions))))))

How 'bout using something like

    (defun edebug--symbol-function (sym)
      (let ((def (symbol-function sym)))
        (if (eq 'macro (car-safe def))
            (setq def (cdr def)))
        (advice--cdr* def)))

and replacing (some) uses of `symbol-function` with it?

>    ;; Remove instrumentation.
>    (dolist (symbol functions)
> -    (setf (symbol-function symbol)
> -          (edebug-unwrap* (symbol-function symbol))))
> +    (if-let ((advised (edebug--advised-p symbol)))
> +        (unless (eq advised t)
> +          (funcall (or (get symbol 'defalias-fset-function) #'fset)
> +                   symbol advised))
> +      (setf (symbol-function symbol)
> +            (edebug-unwrap* (symbol-function symbol)))))

Yuck!

Can't we just use `defalias` rather than `fset` (and that should
take care of calling `defalias-fset-function` when needed)?

> I'm not sure if I should use `indirect-function' somewhere instead of
> `symbol-function',

That's a question for Edebug's ;-)
In the above I assumed that there's a good reason why it uses
`symbol-function` so I preserved it.

> but I also don't understand (and also didn't yet try to find out) why
> nadvice doesn't use `indirect-function' for its manipulations.

That's because if I have `foo` as an alias for `bar` and I advise `foo`
I don't want it to affect `bar`: if you want to affect both, then you
should advise `bar`.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 14 Nov 2019 16:55:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 11:55:32 2019
Received: from localhost ([127.0.0.1]:35129 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVIP6-0005IU-2C
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2019 11:55:32 -0500
Received: from mout.web.de ([217.72.192.78]:52491)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVIP4-0005IF-W5
 for 38195 <at> debbugs.gnu.org; Thu, 14 Nov 2019 11:55:31 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573750517;
 bh=k4BEEg5gQb3gpMA+u47fxxvKmt+H/+LuJCtfG9PZ3Rg=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=KFtSyxOoawZv/mph7kLZsBxmod6tudOY1ryUfntrsbIpd8OKSFSD8XBrIUXztPZtB
 hoOaBsgNBkAO0waEXb3uzLdMVxILtnLnQl8Bg4Rit9/Ww9XR6dymSghqmamuixVzWC
 YMYO26cF7Pw7By7a1p3K/CtVMV6t5oCisVUQnFVI=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb101
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Ls95v-1hkF3541fT-013vX8; Thu, 14
 Nov 2019 17:55:17 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
Date: Thu, 14 Nov 2019 17:55:28 +0100
In-Reply-To: <87r22brq3b.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Thu,
 14 Nov 2019 06:20:40 +0100")
Message-ID: <87eeya9z3z.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:BCsd2fViEp3j80uYI4QKZl052PA+yFVMuHaIHRVLKsJrgQSGi7j
 6FVAHwDcOPfa4QaZkPXe41a9aYfccvwz98FGl5CT97eseFltPzdXq3lBkPlpE1gcNlXwvAG
 4lW4An7gEk9Fd98vI46vXDnLUzq0CjCWiZ1EGo3+tWaSiVwrx6FV1liig47+Rstgoh4nYqD
 DBNOFwKgLvTTIOAqElzEw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:MHWQMZcZjXk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YcVz6e6DXP565VfGePyThUAB9Onchtin0dnTWq/dmVoEJkEB1qjx/w3ya71805f
 CIItNNh/bEsEfUL+9NxiEIqvyLbrGjzKbXQe0HqUw39xjylJFCELFars+aTWaud8chvKJaiAX
 ymzvFZRTbjWTqF+OXB53vY+loxpfoPsrsGFZzY+jzXTPaXfW3a7kMfF5YUKRGQD8ZJv8KfV8X
 tuPG1MhGoZLzOeNoN/Ww2nve7GJ7J3RAh/nPeyRiMxwcvhOCEjK0kNgriNLU=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38195
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> > e.g. (just a random example)
> >
> >   (defun f (x) (* 2 (+ 1 x)))
> >
> >   (advice-add 'f :around (lambda (orig-f x) (1+ (funcall orig-f x))))
> >
> > Instrument `f'.  Then M-x edebug-remove-instrumentation gives
> >
> > "Found no functions to remove instrumentation from".
>
> This is due to edebug-unwrap* not actually unwrapping something if it
> has been advised, apparently...  I'm not familiar enough with how edebug
> really works to fix that.

Stefan, does this patch make sense?


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-WIP-Try-to-fix-edebug-remove-instrumentation-for-adv.patch
Content-Transfer-Encoding: quoted-printable

=46rom c1c2cd4faa0adc87f9334ec92ace8bcf5ae8333e Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Thu, 14 Nov 2019 17:47:51 +0100
Subject: [PATCH] WIP: Try to fix edebug-remove-instrumentation for advised
 funs

=2D--
 lisp/emacs-lisp/edebug.el | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 6b55d7cff0..e94adeb64b 100644
=2D-- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -56,6 +56,7 @@
 (require 'macroexp)
 (require 'cl-lib)
 (eval-when-compile (require 'pcase))
+(eval-when-compile (require 'subr-x))

 ;;; Options

@@ -4571,6 +4572,20 @@ edebug-unload-function
   ;; Continue standard unloading.
   nil)

+(defun edebug--advised-p (symbol)
+  ;; Non-nil when SYMBOL's `symbol-function' is advised.  The non-nil
+  ;; return value is the unwrapped base function if it was wrapped,
+  ;; and the symbol t else.
+  (pcase (symbol-function symbol)
+    ((and (pred advice--p)
+          (app advice--cd*r orig-f)
+          (let unwrapped (edebug-unwrap* orig-f)))
+     (if (equal unwrapped orig-f) t unwrapped))
+    (`(macro . ,(and (pred advice--p)
+                     (app advice--cd*r orig-f)
+                     (let unwrapped (edebug-unwrap* orig-f))))
+     (if (equal unwrapped orig-f) t `(macro . ,unwrapped)))))
+
 (defun edebug-remove-instrumentation (functions)
   "Remove Edebug instrumentation from FUNCTIONS.
 Interactively, the user is prompted for the function to remove
@@ -4582,9 +4597,13 @@ edebug-remove-instrumentation
        (lambda (symbol)
          (when (and (functionp symbol)
                     (get symbol 'edebug))
-           (let ((unwrapped (edebug-unwrap* (symbol-function symbol))))
-             (unless (equal unwrapped (symbol-function symbol))
-               (push symbol functions)))))
+           (if-let ((advised (edebug--advised-p symbol)))
+               (unless (eq advised t)
+                 (push symbol functions))
+             (let ((unwrapped (edebug-unwrap*
+                               (symbol-function symbol))))
+               (unless (equal unwrapped (symbol-function symbol))
+                 (push symbol functions))))))
        obarray)
       (unless functions
         (error "Found no functions to remove instrumentation from"))
@@ -4598,8 +4617,12 @@ edebug-remove-instrumentation
           functions)))))
   ;; Remove instrumentation.
   (dolist (symbol functions)
-    (setf (symbol-function symbol)
-          (edebug-unwrap* (symbol-function symbol))))
+    (if-let ((advised (edebug--advised-p symbol)))
+        (unless (eq advised t)
+          (funcall (or (get symbol 'defalias-fset-function) #'fset)
+                   symbol advised))
+      (setf (symbol-function symbol)
+            (edebug-unwrap* (symbol-function symbol)))))
   (message "Removed edebug instrumentation from %s"
            (mapconcat #'symbol-name functions ", ")))

=2D-
2.24.0


--=-=-=
Content-Type: text/plain


I'm not sure if I should use `indirect-function' somewhere instead of
`symbol-function', but I also don't understand (and also didn't yet try
to find out) why nadvice doesn't use `indirect-function' for its
manipulations.

Thanks,

Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 14 Nov 2019 16:51:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 11:51:58 2019
Received: from localhost ([127.0.0.1]:35117 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVILd-0005Bz-SG
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2019 11:51:58 -0500
Received: from mout.web.de ([212.227.15.3]:57301)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iVILb-0005Be-Ha
 for 38195 <at> debbugs.gnu.org; Thu, 14 Nov 2019 11:51:56 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573750306;
 bh=+MdVigrub7SdHCaQQdsiiE5PBEqyxH5ebFI1une08mc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=dLImkB7RNub3JyscL0uW6JKY2Yh5Vj1Wk2Mr0Rbv/BlkZ/gpulk7QsC37KZBGNquv
 e3At67J6kIvc+pQq6fVUa/qDgbDGDY2fV0k16OUp/Vo+Bf68TwX2vTrsQ8truzLRaW
 tJ6xJ8XCfvgFQHL6nbbvpluotWQpycMkKDkJY5mk=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb004
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MMZck-1iWxqO1OBS-008M05; Thu, 14
 Nov 2019 17:51:46 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN> <87r22brq3b.fsf@HIDDEN>
Date: Thu, 14 Nov 2019 17:51:58 +0100
In-Reply-To: <87r22brq3b.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Thu,
 14 Nov 2019 06:20:40 +0100")
Message-ID: <87imnm9z9t.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:KFedQ8/O9aS4c0ELfWBVhRybOwRZLOQk+4pxYzgnjDeDGWCYxQm
 8m3xa6JnqBPfh8Sdt1gEu6wVlfWV9oDfovLnzZPn6YWg1tvtqc1znAhO5sAG0H4IVrOv5jA
 XV1ak4pXjQBLZ1obpRYs6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0N4Jg1sD3Pfg/v+6y34q/Ro2jf8p+8NbusGdfxo/7zogQuavDjQTyO9+0FAn
 jRXv5mAb2zvLgYFCFyFBQikxpvE9LcCtmkiiEDlUpHAIgQYJWrtqF2Y9V17RksAOgqhc3eZjJ
 TASfrooC+evceb34kMuPRq/paeYxe3+YQf4tObYRrqrJK1josE8OsXzPM+B89RgJDcGGTgMis
 yDq/NYX0K03NMFB3KF7vaxCq4tWHKCLh5BbyF1cnjeiAse8mWT2PI6orWaThueO0rQUinK+vh
 jpy+vKYlT03EJPlbT3qAt1rkM0joIetzrP9Q9NDVNMymoFgbsbS1Aqt2RVmL07lErSwC+gx7q
 zY1JLd0EHgAdFrQI79y7G9VoUXqJm2HqLf5GgkC0uMtkPaj3IITS1rhcur2k=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> > the user interface for edebug-remove-instrumentation could be
> > similar to `cancel-edebug-on-entry', i.e. it could prompt for a
> > function to remove instrumentation from, defaulting to all
> > functions.
>
> Makes sense -- I've now done this.

Thanks!

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at 38195 <at> debbugs.gnu.org:


Received: (at 38195) by debbugs.gnu.org; 14 Nov 2019 05:20:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 00:20:52 2019
Received: from localhost ([127.0.0.1]:60603 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iV7Yq-00081u-KW
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2019 00:20:52 -0500
Received: from quimby.gnus.org ([95.216.78.240]:49054)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iV7Yo-00081g-Cj
 for 38195 <at> debbugs.gnu.org; Thu, 14 Nov 2019 00:20:51 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iV7Yf-0000XI-0S; Thu, 14 Nov 2019 06:20:43 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#38195: 27.0.50; `edebug-remove-instrumentation' doesn't
 work for adviced functions
References: <87mucz98y9.fsf@HIDDEN>
Date: Thu, 14 Nov 2019 06:20:40 +0100
In-Reply-To: <87mucz98y9.fsf@HIDDEN> (Michael Heerdegen's message of "Wed, 13
 Nov 2019 14:55:58 +0100")
Message-ID: <87r22brq3b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Michael Heerdegen <michael_heerdegen@HIDDEN> writes: > Hi,
 > > e.g. (just a random example) > > (defun f (x) (* 2 (+ 1 x))) > >
 (advice-add
 'f :around (lambda (orig-f x) (1+ (funcall orig-f x)))) > > Instrument `f'.
 Then M-x edebug-remove-instrumentatio [...] 
 Content analysis details:   (-1.0 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38195
Cc: 38195 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Hi,
>
> e.g. (just a random example)
>
>   (defun f (x) (* 2 (+ 1 x)))
>
>   (advice-add 'f :around (lambda (orig-f x) (1+ (funcall orig-f x))))
>
> Instrument `f'.  Then M-x edebug-remove-instrumentation gives
>
> "Found no functions to remove instrumentation from".

This is due to edebug-unwrap* not actually unwrapping something if it
has been advised, apparently...  I'm not familiar enough with how edebug
really works to fix that.

> BTW, another point: the user interface for edebug-remove-instrumentation
> could be similar to `cancel-edebug-on-entry', i.e. it could prompt for a
> function to remove instrumentation from, defaulting to all functions.

Makes sense -- I've now done this.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Nov 2019 13:55:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 13 08:55:52 2019
Received: from localhost ([127.0.0.1]:58953 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iUt7g-0007MO-5w
	for submit <at> debbugs.gnu.org; Wed, 13 Nov 2019 08:55:52 -0500
Received: from lists.gnu.org ([209.51.188.17]:51091)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iUt7e-0007ME-B3
 for submit <at> debbugs.gnu.org; Wed, 13 Nov 2019 08:55:50 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:47121)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iUt7d-00083m-4C
 for bug-gnu-emacs@HIDDEN; Wed, 13 Nov 2019 08:55:50 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: **
X-Spam-Status: No, score=2.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 SPOOFED_FREEMAIL,URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1iUt7c-0008QD-7F
 for bug-gnu-emacs@HIDDEN; Wed, 13 Nov 2019 08:55:49 -0500
Received: from mout.web.de ([212.227.15.14]:40465)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1iUt7b-0008P6-Qt
 for bug-gnu-emacs@HIDDEN; Wed, 13 Nov 2019 08:55:48 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1573653344;
 bh=Hdde1LipdeJLf8S7vX94bcR/RpnwkO4ssK/IdZiBuPc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:Date;
 b=UscDF9g/Ou77zD/UXAWhsLx7ncQWQYnMJ4V6ByTw0q+N8vRcE6QRX41seq1a778V6
 C29RkYXjWAzSTA2w1pd4dZsJmd0+8r/2QJaez0FQCSWVAtIxhmTGP9beAElktAizSN
 FCaXiQPb0y79xEJdYXHftB/rxLWsiW6cSH7IeXo4=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb004
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Mb6EN-1iByGJ0YJf-00Kg3m; Wed, 13
 Nov 2019 14:55:44 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; `edebug-remove-instrumentation' doesn't work for adviced
 functions
Date: Wed, 13 Nov 2019 14:55:58 +0100
Message-ID: <87mucz98y9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:s/wPyxXWeqFCR1283UvkMDVt8TwNxUu0/F40ontZnHfY+LkLjzI
 41K+iRP5CXQSIOzLNjWjT4pmupdANzcnavt34t9Xn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XJ8SoVzXDLVkZ
 QY3iZq65EvW4FzVibxnfz1IVZd+YvcEQOi73lcw5V221G8UdHBuQB1xmTG/wDRoXu9XuAHumg
 3pdmSlRRSPfJRX7qoBj3YrW9B6MugZu9tZ265X6oBRKeDDqr2wuhVNDY70JkXTINsnkX+AOzU
 WmXacenQyqWOJCM2UqF8ZXce7S+j1E2mpUkYoX7atc9lhxyh52lp3r+U6Aw7ZJay34UXDP+LG
 fsfoihUEG5ztZBjjs6bF7n5cGzWXRhpeq+LO6KhOgyTKvpGCsAZ+EP58MzMV94nnM305m5Cpj
 76cKEyz5x1eR7r2tK7nR2ipKud2cW8Glayyxb/KnydQYG+bwtazYYjnN2AaqKg/Zg2JdZzJoY
 GjNYKOnykBmSmqX+FWpf61FMPKZ53sHPcTIGaq3ryRPQx44n4C8WVTxpOfJI=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 212.227.15.14
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: submit
Cc: Lars Ingebrigtsen <larsi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


Hi,

e.g. (just a random example)

  (defun f (x) (* 2 (+ 1 x)))

  (advice-add 'f :around (lambda (orig-f x) (1+ (funcall orig-f x))))

Instrument `f'.  Then M-x edebug-remove-instrumentation gives

"Found no functions to remove instrumentation from".

BTW, another point: the user interface for edebug-remove-instrumentation
could be similar to `cancel-edebug-on-entry', i.e. it could prompt for a
function to remove instrumentation from, defaulting to all functions.

TIA,

Michael.


In GNU Emacs 27.0.50 (build 7, x86_64-pc-linux-gnu, GTK+ Version 3.24.12)
 of 2019-11-13 built on drachen
Repository revision: 3c0c95d1cca0875b7ad03247a35ba9e8c1c062ee
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux bullseye/sid





Acknowledgement sent to Michael Heerdegen <michael_heerdegen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#38195; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 27 Nov 2019 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.