From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Toby Cubitt Newsgroups: gmane.emacs.bugs Subject: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Date: Tue, 23 Oct 2012 19:10:45 +0200 Message-ID: <20121023171045.GA30611@c3po> References: <20121019191806.GA23820@c3po> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1351012287 19237 80.91.229.3 (23 Oct 2012 17:11:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2012 17:11:27 +0000 (UTC) Cc: 12685@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 23 19:11:35 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TQi0k-0006tS-Vq for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2012 19:11:27 +0200 Original-Received: from localhost ([::1]:53350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQi0d-0000tF-BV for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2012 13:11:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQi0V-0000sg-9k for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 13:11:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQi0T-0003Tr-Rs for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 13:11:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQi0T-0003Tk-E1 for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 13:11:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TQi2I-0005QI-Bp for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 13:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Toby Cubitt Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Oct 2012 17:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12685 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12685-submit@debbugs.gnu.org id=B12685.135101235720814 (code B ref 12685); Tue, 23 Oct 2012 17:13:02 +0000 Original-Received: (at 12685) by debbugs.gnu.org; 23 Oct 2012 17:12:37 +0000 Original-Received: from localhost ([127.0.0.1]:58066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQi1t-0005Pf-4O for submit@debbugs.gnu.org; Tue, 23 Oct 2012 13:12:37 -0400 Original-Received: from sanddollar.geekisp.com ([216.168.135.167]:36792) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TQi1r-0005PS-2N for 12685@debbugs.gnu.org; Tue, 23 Oct 2012 13:12:35 -0400 Original-Received: (qmail 10567 invoked by uid 1003); 23 Oct 2012 17:10:36 -0000 Original-Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Tue, 23 Oct 2012 13:10:32 -0400 Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.dr-qubit.org/gpg-toby.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) X-Primary-Address: toby@dr-qubit.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65935 Archived-At: On Tue, Oct 23, 2012 at 12:33:34PM -0400, Stefan Monnier wrote: > >> The fact that it aborts execution should be fixable before the release > >> (tho I'm not sure that it's really better to silently mis-interpret the > >> user's request), > > Indeed. But that's what the documentation says it should do, so either > > the documentation or the implementation needs to be changed so that they > > at least match. > > I think at this stage the best is to add a note that it might fail when > used for lexical-binding code. Sounds reasonable. > > I figured as much. Maybe for now we could mention in the Edebug section > > of the Elisp manual which parts of edebug won't (currently) work in > > lexically-scoped code? As far as I can see, M-: and conditional > > breakpoints should be the only things that are affected. (Though > > `edebug-step-in' doesn't always seem to work for me lately, but I can't > > reliably reproduce this at the moment.) > > Agreed. Could you take care of it? I can, but I can't guarantee I'll find time to do it for a couple of weeks, as I'm very busy with work until mid-November. > > Maybe the docs should even recommend disabling lexical-binding when > > edebugging for now. > > I don't think so. The programmer can reach his own conclusion based on > the text you'll add warning that some parts don't work. OK. > > (Is there a good way of configuring this to happen > > automatically? > > No, that would be even worse, since some code only works in > lexical-binding mode (and there's no way to figure out if the code in > the current buffer is in this category). I was asking this out of personal interest, not suggesting it as a way of "fixing" the problem. (I completely agree that it's not a good solution in general.) But the choice currently is: use dynamic-scoping, or use a crippled edebug. The only work-around I can see until this is fixed is to manually disable lexical-binding before instrumenting for edebug. I was asking if you knew of a good place to hook into (just in my own private Emacs config), so that I don't have to do this manually every time I want to run edebug? I'm well aware that this means whatever behaviour I see under edebug could be different from the real behaviour. Given how rarely dynamical-binding differs from lexical-binding in practice, it's still a useful work-around for me, until edebug is fixed. Best, Toby -- Dr T. S. Cubitt Mathematics and Quantum Information group Department of Mathematics Complutense University Madrid, Spain email: tsc25@cantab.net web: www.dr-qubit.org