From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#40992: 27.0.90; Evaluating a function while using edebug breaks Date: Fri, 01 May 2020 23:05:32 -0400 Message-ID: <87sggjm3yb.fsf@gmail.com> References: <87sggkawmz.fsf@russet.org.uk> <20200501155630.GA22689@ACM> <20200501173306.GB22689@ACM> <87o8r7xgb8.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="7458"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Cc: Alan Mackenzie , 40992@debbugs.gnu.org, Phillip Lord To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 02 05:06:12 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 1jUiTj-0001py-Fw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 May 2020 05:06:11 +0200 Original-Received: from localhost ([::1]:54052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUiTi-0002Zv-6o for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 May 2020 23:06:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUiTb-0002Zm-Hq for bug-gnu-emacs@gnu.org; Fri, 01 May 2020 23:06:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUiTa-0004tC-Vh for bug-gnu-emacs@gnu.org; Fri, 01 May 2020 23:06:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUiTa-0004sq-I5 for bug-gnu-emacs@gnu.org; Fri, 01 May 2020 23:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jUiTa-0007gc-C7 for bug-gnu-emacs@gnu.org; Fri, 01 May 2020 23:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 May 2020 03:06: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.158838875529532 (code B ref 40992); Sat, 02 May 2020 03:06:02 +0000 Original-Received: (at 40992) by debbugs.gnu.org; 2 May 2020 03:05:55 +0000 Original-Received: from localhost ([127.0.0.1]:51046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUiTT-0007gF-7s for submit@debbugs.gnu.org; Fri, 01 May 2020 23:05:55 -0400 Original-Received: from mail-qk1-f178.google.com ([209.85.222.178]:37317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUiTM-0007fw-Vh for 40992@debbugs.gnu.org; Fri, 01 May 2020 23:05:53 -0400 Original-Received: by mail-qk1-f178.google.com with SMTP id c10so158145qka.4 for <40992@debbugs.gnu.org>; Fri, 01 May 2020 20:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=1Lx0KketHIUEzktUweZlPh8234FIDLXXsRsPyUHY3zM=; b=c/pj5Iop5HX55tEDTz9C4HhLpGQFz0omn7tOIdjYtotNFY5Dq6L7E26TyN3EW+v1pj F1LaBOXHud3RPRES1mxc0Lr1g9zTyhi+ihn5vW0H8h0ydn9kKERVVW5cx5htyfD1A3sq kXT8dfqRu9fQXCoFbGMbHmvva62jurKslitxnReUqOOlQKx2PMfGsIAOHTX//BqcONs4 6DUT72lmdDT+y+rJtLYZDBbaVmQ0wXZDcNn5ayXA6eGzDD2EB/EAe26h/ZFb0O1MtRAC z7RA68nZqkvRBWQg/bh9IULH1frCV9ZgL0FolNsUl4lQha0LcC6Ktphvxfb/Nb9p8teE 04Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=1Lx0KketHIUEzktUweZlPh8234FIDLXXsRsPyUHY3zM=; b=pY1VizBOrTuNatcEje7hd8QJcv+JniTdkum3HoO2UH2vOFg006hH+G28WEoFhWLVMB U00PvpP9LervIxYOr4hRApsAXIWf+brj0eFkOGYjYi8HDI3MZ5FF3cZ+75bpEUTyY1Ap D5BkKff3fbELXStLRRaw/mqF2fLe6bWo4A8oS25BSNfwBltStYZ0xnaEIQjNkcnbQzsX UYjm10TgP8eNAQKj/rL0WBtxcgFtUkNFSwstqWbOc/phUlmc8d6kieh337UzC5QouPbX ivIouiIkUHMsJ0UIByn6BCPLvrJcRKDTEUzz7eLInGSide75bImOuhHpWHkzNwrAUyvL Csig== X-Gm-Message-State: AGi0PuZMzSy1FFoDfXCImYn8TupMVYgNLj/QGxWiAWu8OG4hot2WH4Nx uC8QX5UdglcT8Wv8sLjqSqDonnGr X-Google-Smtp-Source: APiQypLWFypRjUREsRltCJjHnD93DceRAgXsTJgmSUlM5a77LuChWJdVHRHjU41z8tLtfcxJtX/Ipg== X-Received: by 2002:a37:7ec3:: with SMTP id z186mr6825602qkc.108.1588388743412; Fri, 01 May 2020 20:05:43 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id m83sm4201846qke.117.2020.05.01.20.05.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 May 2020 20:05:42 -0700 (PDT) In-Reply-To: <87o8r7xgb8.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 02 May 2020 03:43:07 +0200") 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:179475 Archived-At: 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))