From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.bugs Subject: bug#51026: 29.0.50; Edebug leaves data in symbols plist after instrumentation Date: Tue, 05 Oct 2021 10:20:14 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27143"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: 51026@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 05 10:34:44 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXfuM-0006rM-KJ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 10:34:43 +0200 Original-Received: from localhost ([::1]:36392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXfuL-0004cw-MT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 04:34:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXfk2-00023s-Ob for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 04:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55689) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXfk2-00074l-GM for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 04:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXfk2-0007v0-7E for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 04:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Oct 2021 08:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51026 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163342218330359 (code B ref -1); Tue, 05 Oct 2021 08:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Oct 2021 08:23:03 +0000 Original-Received: from localhost ([127.0.0.1]:39002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXfj5-0007tb-5H for submit@debbugs.gnu.org; Tue, 05 Oct 2021 04:23:03 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:49814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXfj1-0007sw-Tm for submit@debbugs.gnu.org; Tue, 05 Oct 2021 04:23:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXfiy-0000Ve-4G for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 04:22:59 -0400 Original-Received: from mail-oln040092073020.outbound.protection.outlook.com ([40.92.73.20]:42614 helo=EUR04-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXfis-0003T4-4R for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 04:22:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RDaNmQ6y4DEnMg4uGdjw+Ch8g+bb0Tp7FJsuVv0pcUfMnbFjbf9au1EcUBFTYzY3tYlu4+tUCzlwTRICAwlcMfdtcubsfZYTOyB3rd/iEApw+wekd19jmKJ3WizM56A/rHaxTWQ4jYOdhsCRhOPq7J8XGumwLhmdVcbRNLlWIaFsG8pkEn1aeBY5F2q3MAkgVjeRcqwqyocZl94/cZmx8b8uqJo3p5LisUqoEVDrwm2qNTCIyFSlFGBOBbYVrsgDsO214Kmag2/uzJM55fLtvZzhhIr+SkkpzPOTjvJIWoDmH4HncKGITsl+ZHCMBU//HGbsS1tsJjzPgB3A9afJ4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qYksUyYv+Afc+C1IEyzRLOnfy5XlJQVCRGDe4ChmtZc=; b=jVTnJbediEoNyFg5ItW5ZnsPxtOL1IJc12W9tli1DDcG0MKliltHHGOc2yhCgR/8dEh+waTvQYK9dnzB50byszPMBttwmuv/MtM41Afispau/N/8kdKFusTUfmx1av8zJfw5Lch9l4kQcpT0W7FWnxjPN2kGBZtgq9JUxLFRu6atm89fQdEx5dXMcmRpQAyrdcJweNI9wZES29dAnJsKwwoigriOpMpo11HadHmlruyJS8X4tnQDQ8eFa8encJgU8nZUPIRQZusmzo3d3o4MvZXQtcrUCZ7Exzdk0azYyGeuStARmXDQ8bcjj7OXK11khTlFMRrMReNtxMzqjVYFNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qYksUyYv+Afc+C1IEyzRLOnfy5XlJQVCRGDe4ChmtZc=; b=muZO+wPSebOUOsB47nPrWuY/aHtPdyQ1W0gNlp5/ciN5GbFsNXoJYrQFO3ZLxcVwh9gO3BSq2GNNFbRHrcVxJe1EhJNg2Nw/rsM5/RqObNBk/Nv+BS3eM447MVHFQ7dXvVuxPBVzpzaqBYHL5gVx7WbrgP6el45XYcBGy2C+Dc34eEMpcbhCbqnmYYmuxiOxPUxNRRbuDzZNZxyLcWWP/+muAEdoNVdDZX2YhBkJiWJLf6O7EubwcHm1WtuupzvQ6wfondZRHLJSlmv21NzfG81M7l4Xq7xfbY9bwWNyqIbAZ4Kf1IJ/IPfBUre8F1D9SVfx875twgjDyQhDhpGycQ== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM9PR09MB4849.eurprd09.prod.outlook.com (2603:10a6:20b:2d7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.17; Tue, 5 Oct 2021 08:22:44 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c05b:e2ca:5b8a:56d2]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c05b:e2ca:5b8a:56d2%9]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 08:22:44 +0000 X-TMN: [fXXQG0dZVLdkeAGXWeg2bePJebmiW927] X-ClientProxiedBy: AS9PR0301CA0052.eurprd03.prod.outlook.com (2603:10a6:20b:469::7) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87ilybvq25.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AS9PR0301CA0052.eurprd03.prod.outlook.com (2603:10a6:20b:469::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.22 via Frontend Transport; Tue, 5 Oct 2021 08:22:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ecca4692-195e-4b35-bfc7-08d987d94df3 X-MS-TrafficTypeDiagnostic: AM9PR09MB4849: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oxpN4Pevv0ylNn7X/g2FD3+FoZRHStEmB5kEfWGhfmePf7xdyt1tx0LIbDBIMa9+moC3GhaqwhfKWeZ6yOsuAFad/7jF7mCSMVeyBekjvlJgkhCUTg7zhohdppNKWrPF+qRwInt5vPgOF8LoPfys0x1gAM0B//z0IXHAeIndWVC50XwSjVjV2X655Xq6FvR9/egJDZt1TQg6jHAvrCT6su55UJM4J/uTCUIJM8QhqubnYLkRm+oqhI5N1pCuWnqBLmC7tecNGIKqq/kZyuJJYlDGWBaYUmH90I83cIvQ93v2gxJDtcwIR9PQ6NOtrAlOdaZUNQIJxhXnZ5PZdqDWKbxD66h6m9Vw6/mg+fJp37TrzF98cPnEaP5eyuEQvjf3ZkcX//r8uPCtaWvvUyKwvEWL6TjGi/oGPlXCKTpNuWvjJrF7nhT57cdz0W1iR05C X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Gg83g25jiWR3EQFciIWoSDvuFCfHWsHK5peQ1Bt2+53wpB3Pr38JpliGowMtbib74h6lSEHdpRdXl7qyrC1dSi+gewZ5N0AagTteoTsLz16xOZZ5CviZ8y+XfA6HzVEAI6zKsfyQYrL4Lppm0lAvdA== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-72e6e.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: ecca4692-195e-4b35-bfc7-08d987d94df3 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2021 08:22:44.1152 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR09MB4849 Received-SPF: pass client-ip=40.92.73.20; envelope-from=arthur.miller@live.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216430 Archived-At: --=-=-= Content-Type: text/plain 1. Instrument any defun/macro for edebug with C-u M-x RET eval-defun 2. Remove instrumentation with M-x edebug-remove-instrumentation RET 3. Check the chosed symbols plist: M-x (symbol-plist 'whatever-you-used) Edebug data will be present in plist after instrumentation is removed. Attached patch is suggestion to fix 'edebug-remove-instrumentation' to remove unnecessary data after instrumentation. Is edebug-remove-instrumentation only function that can remove edebug instrumentation? I am not though sure, if some other place needs to be patched, I am thinking mostly of edebug-read-and-maybe-wrap-form. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Clean-edebug-props-on-instrumentation-removal.patch >From 057a4278bf0b8c8a8985850b505f0a1addd8156f Mon Sep 17 00:00:00 2001 From: Arthur Miller Date: Tue, 5 Oct 2021 09:17:20 +0200 Subject: [PATCH] Clean edebug props on instrumentation removal * lisp/emacs-lisp/edebug.el (edebug--strip-plist): New function. (edebug-remove-instrumentation): Added call to 'edebug--strip-plist'. --- lisp/emacs-lisp/edebug.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index a38c8bd5ca..da8a3f1eb8 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -4529,6 +4529,13 @@ edebug--unwrap*-symbol-function (was-macro `(macro . ,unwrapped)) (t unwrapped)))))) +(defun edebug--strip-plist (symbol) + "Remove edebug related properties from SYMBOL's plist." + (dolist (prop '(edebug edebug-behavior edebug-coverage + edebug-form-spec edebug-freq-count + ghost-edebug)) + (cl-remprop symbol prop))) + (defun edebug-remove-instrumentation (functions) "Remove Edebug instrumentation from FUNCTIONS. Interactively, the user is prompted for the function to remove @@ -4560,6 +4567,7 @@ edebug-remove-instrumentation (dolist (symbol functions) (when-let ((unwrapped (edebug--unwrap*-symbol-function symbol))) + (edebug--strip-plist symbol) (defalias symbol unwrapped))) (message "Removed edebug instrumentation from %s" (mapconcat #'symbol-name functions ", "))) -- 2.33.0 --=-=-= Content-Type: text/plain In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, cairo version 1.17.4) of 2021-10-04 built on pascal Repository revision: c6be44d9b3ec09195f6279e9a503175f8fd60e14 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: Arch Linux Configured using: 'configure --without-modules --with-cairo --with-compress-install --with-x-toolkit=no --with-gnutls --without-gconf --without-xwidgets --without-toolkit-scroll-bars --without-xaw3d --without-gsettings --with-mailutils --with-native-compilation 'CFLAGS=-O2 -march=native -mtune=native'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT NATIVE_COMP NOTIFY INOTIFY OLDXMENU PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF X11 XDBE XIM XPM ZLIB Important settings: value of $LANG: sv_SE.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: text-scale-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs password-cache json map mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date compile text-property-search comint ansi-color ring helper edmacro kmacro help-fns radix-tree edebug comp comp-cstr warnings rx cl-seq cl-macs cl-extra debug backtrace help-mode find-func trace elp face-remap vc-git diff-mode easy-mmode vc-dispatcher cl-loaddefs cl-lib seq gv subr-x byte-opt bytecomp byte-compile cconv paren iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting font-render-setting cairo x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 123973 8004) (symbols 48 10003 0) (strings 32 29672 1979) (string-bytes 1 1004452) (vectors 16 21210) (vector-slots 8 371233 17772) (floats 8 50 42) (intervals 56 638 1) (buffers 992 15)) --=-=-=--