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:14:42 +0000 Message-ID: <20200502131442.GB6832@ACM> References: <87sggkawmz.fsf@russet.org.uk> <20200501155630.GA22689@ACM> <20200501173306.GB22689@ACM> <87o8r7xgb8.fsf@gnus.org> <87sggjm3yb.fsf@gmail.com> 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="110472"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 40992@debbugs.gnu.org, Phillip Lord To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 02 15:15:19 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 1jUrzC-000SaG-Ka for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 May 2020 15:15:18 +0200 Original-Received: from localhost ([::1]:47272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUrzB-0003mv-NW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 May 2020 09:15:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUryz-0003dB-Dh for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 09:15:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUryx-0003VY-4x for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 09:15:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39982) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUryw-0003VN-Np for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 09:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jUryw-0002Fh-Jt for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 09:15: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:15: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.15884252898614 (code B ref 40992); Sat, 02 May 2020 13:15:02 +0000 Original-Received: (at 40992) by debbugs.gnu.org; 2 May 2020 13:14:49 +0000 Original-Received: from localhost ([127.0.0.1]:51527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUryj-0002Es-Gq for submit@debbugs.gnu.org; Sat, 02 May 2020 09:14:49 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:14356 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jUryh-0002Ei-Dt for 40992@debbugs.gnu.org; Sat, 02 May 2020 09:14:48 -0400 Original-Received: (qmail 98779 invoked by uid 3782); 2 May 2020 13:14:45 -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:14:42 +0200 Original-Received: (qmail 6858 invoked by uid 1000); 2 May 2020 13:14:42 -0000 Content-Disposition: inline In-Reply-To: <87sggjm3yb.fsf@gmail.com> 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:179503 Archived-At: Hello, Noam, Eli, Lars, and Phillip. On Fri, May 01, 2020 at 23:05:32 -0400, Noam Postavsky wrote: > Lars Ingebrigtsen writes: > > Alan Mackenzie writes: > >> There doesn't appear to be a good way of solving this bug. A workable > >> workaround would be to check that the 'edebug property value is a list > >> in edebug--overlay-breakpoints, and just to remove the breakpoint > >> highlights when it's not a list. When it's not a list, it's a marker > >> pointing to the start of the function, from which the end of the > >> function can be found, to serve as the END argument to > >> edebug--overlay-breakpoints-remove. > >> Or something like that. :-( > > 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? > --- i/lisp/emacs-lisp/edebug.el > +++ w/lisp/emacs-lisp/edebug.el > @@ -3236,8 +3236,9 @@ 'edebug-breakpoint > "\x3c\x7e\xff\xff\xff\xff\x7e\x3c") > (defun edebug--overlay-breakpoints (function) > - (let* ((data (get function 'edebug)) > - (start (nth 0 data)) > + (let ((data (get function 'edebug))) > + (when (listp data) > + (let* ((start (nth 0 data)) > (breakpoints (nth 1 data)) > (offsets (nth 2 data))) > ;; First remove all old breakpoint overlays. > @@ -3264,6 +3265,7 @@ edebug--overlay-breakpoints > (propertize > "x" 'display > `(left-fringe edebug-breakpoint ,face))))))))) > + )) > (defun edebug--overlay-breakpoints-remove (start end) > (dolist (overlay (overlays-in start end)) That function might not remove any existing breakpoint highlights (which normally would get removed by the call to edebug--overlay-breakpoints-remove, which takes the value of the 'edebug property (indirectly) as an argument. I've tried vaguely to create a situation where the highlights get left in place, but haven't managed it yet. -- Alan Mackenzie (Nuremberg, Germany).