From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#40992: 27.0.90; Evaluating a function while using edebug breaks Date: Sat, 2 May 2020 13:34:47 +0000 Message-ID: <20200502133447.GC6832@ACM> References: <87sggkawmz.fsf@russet.org.uk> <20200501155630.GA22689@ACM> <20200501173306.GB22689@ACM> <87o8r7xgb8.fsf@gnus.org> <87sggjm3yb.fsf@gmail.com> <83wo5uu81f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="68124"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 40992@debbugs.gnu.org, Noam Postavsky , phillip.lord@russet.org.uk To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 02 15:36:18 2020 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 1jUsJV-000HbD-HO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 May 2020 15:36:17 +0200 Original-Received: from localhost ([::1]:36422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUsJU-0006hN-KI for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 May 2020 09:36:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUsJI-0006c9-26 for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 09:36:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUsJH-0005Eh-E7 for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 09:36:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUsJH-0005EQ-1f for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 09:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jUsJG-0004vm-Vp for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 09:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 May 2020 13:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40992 X-GNU-PR-Package: emacs Original-Received: via spool by 40992-submit@debbugs.gnu.org id=B40992.158842650818865 (code B ref 40992); Sat, 02 May 2020 13:36:02 +0000 Original-Received: (at 40992) by debbugs.gnu.org; 2 May 2020 13:35:08 +0000 Original-Received: from localhost ([127.0.0.1]:51580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUsI9-0004ta-Nr for submit@debbugs.gnu.org; Sat, 02 May 2020 09:35:08 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:15411 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jUsI7-0004tR-K8 for 40992@debbugs.gnu.org; Sat, 02 May 2020 09:34:52 -0400 Original-Received: (qmail 13978 invoked by uid 3782); 2 May 2020 13:34:50 -0000 Original-Received: from acm.muc.de (p2E5D51F4.dip0.t-ipconnect.de [46.93.81.244]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sat, 02 May 2020 15:34:47 +0200 Original-Received: (qmail 6871 invoked by uid 1000); 2 May 2020 13:34:47 -0000 Content-Disposition: inline In-Reply-To: <83wo5uu81f.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 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:179505 Archived-At: Hello, Eli. On Sat, May 02, 2020 at 10:10:04 +0300, Eli Zaretskii wrote: > > From: Noam Postavsky > > Date: Fri, 01 May 2020 23:05:32 -0400 > > Cc: Alan Mackenzie , 40992@debbugs.gnu.org, > > Phillip Lord > > > I think that sounds like a good solution on master, but the patch that > > > introduced this should probably be reverted on emacs-27 -- it wasn't a > > > bug fix, but a new feature, so reverting it should be safe, I think. > > I don't understand; the fix looks trivial to me (leaving out > > indentation), and only touches a new function. Surely this is okay for > > emacs-27? > If this fixes the problem, it's okay for emacs-27. But then why did > Alan say there was no easy solution? I think I said "good" rather than "easy". This 'edebug property is essentially associated with a function, but is in a symbol's property list. Noam's fix, I think, will either leave stale highlights on what used to be breakpoints, or won't leave the highlights active whilst the debugging is still in progress. It might be the least bad fix, though. At the time of debugging, there are _two_ functions associated with `hanoi', the one just compiled with C-M-x, and the instrumented one still being debugged (which will soon find its way to the garbage collector). There is no way to attach a property list to a function (and it's too late to add one for Emacs 27 ;-), so prop 'edebug gets on the symbol's plist, and confusion results. Hence this bug. A good solution would fix this confusion. I can't think of a way to do this which doesn't involve deep surgery on Emacs's internals. I think the same mechanism is behind the annoying bug (not yet reported by me) where you do M-x compile-defun on a previously instrumented function, then try to instrument it again by typing I (`edebug-instrument-callee') whilst in Edebug. You get the spurious error message "Already instrumented". -- Alan Mackenzie (Nuremberg, Germany).