From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 19 15:19:46 2012 Received: (at submit) by debbugs.gnu.org; 19 Oct 2012 19:19:46 +0000 Received: from localhost ([127.0.0.1]:52100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPI6k-0005gH-1C for submit@debbugs.gnu.org; Fri, 19 Oct 2012 15:19:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45632) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPI6g-0005g3-NG for submit@debbugs.gnu.org; Fri, 19 Oct 2012 15:19:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPI56-0004rL-1b for submit@debbugs.gnu.org; Fri, 19 Oct 2012 15:18:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:33017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPI55-0004rH-Uc for submit@debbugs.gnu.org; Fri, 19 Oct 2012 15:18:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPI54-0004gz-F2 for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 15:18:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPI52-0004oY-LK for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 15:18:02 -0400 Received: from sanddollar.geekisp.com ([216.168.135.167]:16408) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TPI52-0004n4-Fo for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 15:18:00 -0400 Received: (qmail 30104 invoked by uid 1003); 19 Oct 2012 19:17:56 -0000 Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Fri, 19 Oct 2012 15:17:54 -0400 Date: Fri, 19 Oct 2012 21:18:06 +0200 To: bug-gnu-emacs@gnu.org Subject: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: <20121019191806.GA23820@c3po> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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) From: Toby Cubitt X-Primary-Address: toby@dr-qubit.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Toby Cubitt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Conditional breakpoints whose condition refers to a lexically-scoped variable fail with a "Symbol's value as variable is void" error. This is almost certainly caused by the same issue as http://thread.gmane.org/gmane.emacs.devel/150556 That report mentioned that inspecting lexical variables during an edebug session using M-: doesn't work. It seems worth pointing out that this issue also makes conditional breakpoints almost useless. (The break condition will depend on local variables 9 times out of 10.) I searched and couldn't find an existing bug for this, so I'm creating one to track the issue. It seems to me that both these breakages are bugs, not just missing features. The Edebug/Evaluation section of the Elisp manual contains: `M-: EXP ' Evaluate expression EXP in the context of Edebug itself (`eval-expression'). I'm not clear on precisely what "in the context of Edebug itself" implies, but it seems to me to strongly suggest that M-: should let you inspect the values of local variables. The Edebug/Breaks/Breakpoints section states: A "conditional breakpoint" tests a condition each time the program gets there. Any errors that occur as a result of evaluating the condition are ignored, as if the result were `nil'. The current behaviour definitely contradicts this. Not only does the breakpoint not work, the error is not "ignored and treated as if the result were nil", but instead aborts execution. If this can't be fixed before the next release, at the very least the Edebug section of the manual should be fixed to document that these features currently don't work in lexically-scoped code. I'd advocate fixing both bugs before the next release, even in feature-freeze, since edebug is currently crippled in lexically-scoped code. But it seems clear that this need C level changes, and I'm not expert enough to produce a patch. (Pedantic) steps to reproduce: 1. Create a file with the following contents: ================================================== (defun test () (let ((x 0)) (while (< x 10) (setq x (1+ x0))))) ================================================== 2. Open the file in a buffer, and do: "M-: (setq lexical-binding t)" 3. Instrument the function for edebug (C-u C-M-x) 4. Create a conditional breakpoint (C-x X x) anywhere inside the loop 5. Set the breakpoint condition: "(= x 5)" 6. M-: (test) Emacs aborts executing the function with: Symbol's value as variable is void: x The expected result is obviously for the function to run until x is equal to 5. Cheers, Toby In GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-03 on c3po Windowing system distributor `The X.Org Foundation', version 11.0.11202000 Configured using: `configure '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--disable-dependency-tracking' '--program-suffix=-emacs-24' '--infodir=/usr/share/info/emacs-24' '--enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../lib' '--with-gameuser=games' '--without-compress-info' '--disable-maintainer-mode' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' '--without-gnutls' '--without-xml2' '--without-selinux' '--without-wide-int' '--without-sound' '--with-x' '--without-ns' '--without-gconf' '--without-gsettings' '--with-toolkit-scroll-bars' '--without-gif' '--without-jpeg' '--without-png' '--without-rsvg' '--without-tiff' '--with-xpm' '--without-imagemagick' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' 'GENTOO_PACKAGE=app-editors/emacs-24.2' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=prescott -O2 -pipe -O2' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_GB.utf-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t -- 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 19 17:43:28 2012 Received: (at 12685) by debbugs.gnu.org; 19 Oct 2012 21:43:28 +0000 Received: from localhost ([127.0.0.1]:52208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPKLo-0001Mj-DB for submit@debbugs.gnu.org; Fri, 19 Oct 2012 17:43:28 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:8960) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPKLm-0001MX-VO for 12685@debbugs.gnu.org; Fri, 19 Oct 2012 17:43:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCoeh/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFC7l+kEQDliqNCYFYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="202331848" Received: from 76-10-135-161.dsl.teksavvy.com (HELO ceviche.home) ([76.10.135.161]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Oct 2012 17:41:49 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 51DF2660E0; Fri, 19 Oct 2012 17:41:49 -0400 (EDT) From: Stefan Monnier To: Toby Cubitt Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: References: <20121019191806.GA23820@c3po> Date: Fri, 19 Oct 2012 17:41:49 -0400 In-Reply-To: <20121019191806.GA23820@c3po> (Toby Cubitt's message of "Fri, 19 Oct 2012 21:18:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12685 Cc: 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > Conditional breakpoints whose condition refers to a lexically-scoped > variable fail with a "Symbol's value as variable is void" error. > This is almost certainly caused by the same issue as > http://thread.gmane.org/gmane.emacs.devel/150556 Indeed. > The current behaviour definitely contradicts this. Not only does the > breakpoint not work, the error is not "ignored and treated as if the > result were nil", but instead aborts execution. 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), but making it actually work will require more substantial changes, so I don't think it's likely to be fixed for 24.3. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 19 21:10:08 2012 Received: (at 12685) by debbugs.gnu.org; 20 Oct 2012 01:10:08 +0000 Received: from localhost ([127.0.0.1]:52427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPNZn-00063i-K3 for submit@debbugs.gnu.org; Fri, 19 Oct 2012 21:10:08 -0400 Received: from starfish.geekisp.com ([216.168.135.166]:32167) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TPNZk-00063A-VI for 12685@debbugs.gnu.org; Fri, 19 Oct 2012 21:10:06 -0400 Received: (qmail 6905 invoked by uid 1003); 20 Oct 2012 01:08:26 -0000 Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Fri, 19 Oct 2012 21:08:24 -0400 Date: Sat, 20 Oct 2012 03:08:35 +0200 To: Stefan Monnier Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: <20121020010835.GA2683@c3po> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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) From: Toby Cubitt X-Primary-Address: toby@dr-qubit.org X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, Oct 19, 2012 at 05:41:49PM -0400, Stefan Monnier wrote: > > Conditional breakpoints whose condition refers to a lexically-scoped > > variable fail with a "Symbol's value as variable is void" error. > > This is almost certainly caused by the same issue as > > http://thread.gmane.org/gmane.emacs.devel/150556 > > Indeed. > > > The current behaviour definitely contradicts this. Not only does the > > breakpoint not work, the error is not "ignored and treated as if the > > result were nil", but instead aborts execution. > > 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), [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 1.5 FAKE_REPLY_C FAKE_REPLY_C X-Debbugs-Envelope-To: 12685 Cc: 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, Oct 19, 2012 at 05:41:49PM -0400, Stefan Monnier wrote: > > Conditional breakpoints whose condition refers to a lexically-scoped > > variable fail with a "Symbol's value as variable is void" error. > > This is almost certainly caused by the same issue as > > http://thread.gmane.org/gmane.emacs.devel/150556 > > Indeed. > > > The current behaviour definitely contradicts this. Not only does the > > breakpoint not work, the error is not "ignored and treated as if the > > result were nil", but instead aborts execution. > > 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), [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 1.5 FAKE_REPLY_C FAKE_REPLY_C On Fri, Oct 19, 2012 at 05:41:49PM -0400, Stefan Monnier wrote: > > Conditional breakpoints whose condition refers to a lexically-scoped > > variable fail with a "Symbol's value as variable is void" error. > > This is almost certainly caused by the same issue as > > http://thread.gmane.org/gmane.emacs.devel/150556 > > Indeed. > > > The current behaviour definitely contradicts this. Not only does the > > breakpoint not work, the error is not "ignored and treated as if the > > result were nil", but instead aborts execution. > > 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. > But making it actually work will require more substantial changes, so I > don't think it's likely to be fixed for 24.3. 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.) Maybe the docs should even recommend disabling lexical-binding when edebugging for now. (Is there a good way of configuring this to happen automatically? `edebug-setup-hook' doesn't seem quite the right place, since it gets reset to nil after use.) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 23 12:35:35 2012 Received: (at 12685) by debbugs.gnu.org; 23 Oct 2012 16:35:35 +0000 Received: from localhost ([127.0.0.1]:58035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQhS3-0004XP-0O for submit@debbugs.gnu.org; Tue, 23 Oct 2012 12:35:35 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:53643) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQhS1-0004XC-KJ for 12685@debbugs.gnu.org; Tue, 23 Oct 2012 12:35:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCqNj/2dsb2JhbABEtBGBCIIVAQEEAVYeBQULCw4mEhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="202550312" Received: from 76-10-163-99.dsl.teksavvy.com (HELO pastel.home) ([76.10.163.99]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Oct 2012 12:33:34 -0400 Received: by pastel.home (Postfix, from userid 20848) id 636CC58CA3; Tue, 23 Oct 2012 12:33:34 -0400 (EDT) From: Stefan Monnier To: Toby Cubitt Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: References: <20121020010835.GA2683@c3po> Date: Tue, 23 Oct 2012 12:33:34 -0400 In-Reply-To: <20121020010835.GA2683@c3po> (Toby Cubitt's message of "Sat, 20 Oct 2012 03:08:35 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12685 Cc: 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) >> 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. > 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? > 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. > (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). Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 23 13:12:37 2012 Received: (at 12685) by debbugs.gnu.org; 23 Oct 2012 17:12:37 +0000 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 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 Received: (qmail 10567 invoked by uid 1003); 23 Oct 2012 17:10:36 -0000 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 Date: Tue, 23 Oct 2012 19:10:45 +0200 To: Stefan Monnier Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: <20121023171045.GA30611@c3po> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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) From: Toby Cubitt X-Primary-Address: toby@dr-qubit.org X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 1.5 FAKE_REPLY_C FAKE_REPLY_C X-Debbugs-Envelope-To: 12685 Cc: 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 1.5 FAKE_REPLY_C FAKE_REPLY_C 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 23 14:29:47 2012 Received: (at 12685) by debbugs.gnu.org; 23 Oct 2012 18:29:47 +0000 Received: from localhost ([127.0.0.1]:58104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQjEZ-0007C2-Gv for submit@debbugs.gnu.org; Tue, 23 Oct 2012 14:29:47 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:35802) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQjEX-0007Bp-N4 for 12685@debbugs.gnu.org; Tue, 23 Oct 2012 14:29:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCqNj/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="202561007" Received: from 76-10-163-99.dsl.teksavvy.com (HELO pastel.home) ([76.10.163.99]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Oct 2012 14:27:46 -0400 Received: by pastel.home (Postfix, from userid 20848) id 22A2658CA3; Tue, 23 Oct 2012 14:27:45 -0400 (EDT) From: Stefan Monnier To: Toby Cubitt Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: References: <20121023171045.GA30611@c3po> Date: Tue, 23 Oct 2012 14:27:45 -0400 In-Reply-To: <20121023171045.GA30611@c3po> (Toby Cubitt's message of "Tue, 23 Oct 2012 19:10:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12685 Cc: 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > 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? You might try to add an around-advice on edebug-eval-defun (and maybe edebug-eval-top-level-form if you use it). > 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. You're not addicted to closures like I am, I guess, Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 23 14:41:42 2012 Received: (at 12685) by debbugs.gnu.org; 23 Oct 2012 18:41:42 +0000 Received: from localhost ([127.0.0.1]:58124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQjQ5-0007V9-P2 for submit@debbugs.gnu.org; Tue, 23 Oct 2012 14:41:42 -0400 Received: from starfish.geekisp.com ([216.168.135.166]:19738) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TQjQ3-0007Uw-3O for 12685@debbugs.gnu.org; Tue, 23 Oct 2012 14:41:40 -0400 Received: (qmail 11980 invoked by uid 1003); 23 Oct 2012 18:39:39 -0000 Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Tue, 23 Oct 2012 14:39:37 -0400 Date: Tue, 23 Oct 2012 20:39:50 +0200 To: Stefan Monnier Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: <20121023183950.GA13930@c3po> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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) From: Toby Cubitt X-Primary-Address: toby@dr-qubit.org X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Tue, Oct 23, 2012 at 02:27:45PM -0400, Stefan Monnier wrote: > > 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? > > You might try to add an around-advice on edebug-eval-defun (and maybe > edebug-eval-top-level-form if you use it). [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 1.5 FAKE_REPLY_C FAKE_REPLY_C X-Debbugs-Envelope-To: 12685 Cc: 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Tue, Oct 23, 2012 at 02:27:45PM -0400, Stefan Monnier wrote: > > 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? > > You might try to add an around-advice on edebug-eval-defun (and maybe > edebug-eval-top-level-form if you use it). [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 1.5 FAKE_REPLY_C FAKE_REPLY_C On Tue, Oct 23, 2012 at 02:27:45PM -0400, Stefan Monnier wrote: > > 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? > > You might try to add an around-advice on edebug-eval-defun (and maybe > edebug-eval-top-level-form if you use it). Thanks! I should have thought of that, but for some reason I didn't consider using advice (probably a habit formed by avoiding advice in packages). > > 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. > > You're not addicted to closures like I am, I guess, Not yet :) Closures are very elegant. But I only recently started converting my Elisp code to lexical binding, so almost all of it works just fine under dynamic binding for now. Now if the byte-compiler learned how to do tail-call elimination, I might find myself writing more of my Elisp in a pure functional style... Just sayin' ;-) 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 24 09:57:45 2012 Received: (at 12685) by debbugs.gnu.org; 24 Oct 2012 13:57:45 +0000 Received: from localhost ([127.0.0.1]:59670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TR1Sr-0004zH-7h for submit@debbugs.gnu.org; Wed, 24 Oct 2012 09:57:45 -0400 Received: from relais.videotron.ca ([24.201.245.36]:28356) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TR1Sp-0004z8-7j for 12685@debbugs.gnu.org; Wed, 24 Oct 2012 09:57:43 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ceviche.home ([24.201.208.110]) by VL-VM-MR001.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0MCE0057FHCV4O80@VL-VM-MR001.ip.videotron.ca> for 12685@debbugs.gnu.org; Wed, 24 Oct 2012 09:55:43 -0400 (EDT) Received: by ceviche.home (Postfix, from userid 20848) id 3C9D8660E0; Wed, 24 Oct 2012 09:55:43 -0400 (EDT) From: Stefan Monnier To: Toby Cubitt Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-id: References: <20121023183950.GA13930@c3po> Date: Wed, 24 Oct 2012 09:55:43 -0400 In-reply-to: <20121023183950.GA13930@c3po> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Now if the byte-compiler learned how to do tail-call elimination, I might > find myself writing more of my Elisp in a pure functional style... > Just sayin' ;-) Preaching to the choir, eh? Stefan [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [24.201.245.36 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 0.1 HDRS_LCASE Odd capitalization of message header 0.0 T_MANY_HDRS_LCASE Odd capitalization of multiple message headers X-Debbugs-Envelope-To: 12685 Cc: 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Now if the byte-compiler learned how to do tail-call elimination, I might > find myself writing more of my Elisp in a pure functional style... > Just sayin' ;-) Preaching to the choir, eh? Stefan [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [24.201.245.36 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4988] > Now if the byte-compiler learned how to do tail-call elimination, I might > find myself writing more of my Elisp in a pure functional style... > Just sayin' ;-) Preaching to the choir, eh? Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 26 12:09:14 2013 Received: (at 12685) by debbugs.gnu.org; 26 Jul 2013 16:09:14 +0000 Received: from localhost ([127.0.0.1]:51397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V2kZt-0008JC-Mi for submit@debbugs.gnu.org; Fri, 26 Jul 2013 12:09:14 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:22072) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V2kZr-0008Ic-Hy for 12685@debbugs.gnu.org; Fri, 26 Jul 2013 12:09:12 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZPn/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBgzBIZEKA5cpjVGBXoMT X-IPAS-Result: Av4EABK/CFFFpZPn/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBgzBIZEKA5cpjVGBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="19912610" Received: from 69-165-147-231.dsl.teksavvy.com (HELO pastel.home) ([69.165.147.231]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 Jul 2013 12:08:59 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1D43F62D1A; Fri, 26 Jul 2013 12:09:05 -0400 (EDT) From: Stefan Monnier To: Toby Cubitt Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: References: <20121019191806.GA23820@c3po> Date: Fri, 26 Jul 2013 12:09:05 -0400 In-Reply-To: <20121019191806.GA23820@c3po> (Toby Cubitt's message of "Fri, 19 Oct 2012 21:18:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 12685 Cc: Toby Cubitt , egnarts-ms , 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Conditional breakpoints whose condition refers to a lexically-scoped > variable fail with a "Symbol's value as variable is void" error. > This is almost certainly caused by the same issue as > http://thread.gmane.org/gmane.emacs.devel/150556 I've just installed a patch into trunk which should make Edebug properly use the lexical scope of the debugged code (when applicable). Could you confirm it fixes this bug? Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 30 12:24:22 2013 Received: (at control) by debbugs.gnu.org; 30 Jul 2013 16:24:22 +0000 Received: from localhost ([127.0.0.1]:58658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4Cij-0002fi-Tf for submit@debbugs.gnu.org; Tue, 30 Jul 2013 12:24:22 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:54917 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4Cih-0002fa-LP for control@debbugs.gnu.org; Tue, 30 Jul 2013 12:24:19 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1V4Cih-00084J-DY for control@debbugs.gnu.org; Tue, 30 Jul 2013 12:24:19 -0400 Date: Tue, 30 Jul 2013 12:24:19 -0400 Message-Id: Subject: control message for bug 12685 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.5 (------) close 12685 24.4 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 05 11:15:03 2013 Received: (at 12685) by debbugs.gnu.org; 5 Aug 2013 15:15:04 +0000 Received: from localhost ([127.0.0.1]:41425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V6MUw-0004Cz-RX for submit@debbugs.gnu.org; Mon, 05 Aug 2013 11:15:03 -0400 Received: from sanddollar.geekisp.com ([216.168.135.167]:8971) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1V6MUt-0004Bw-Hi for 12685@debbugs.gnu.org; Mon, 05 Aug 2013 11:15:00 -0400 Received: (qmail 6629 invoked by uid 1003); 5 Aug 2013 15:14:54 -0000 Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Mon, 05 Aug 2013 11:14:49 -0400 Date: Mon, 5 Aug 2013 16:14:46 +0100 To: Stefan Monnier Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: <20130805151446.GA12256@c3po> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.dr-qubit.org/gpg-toby-pub.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) From: Toby Cubitt X-Primary-Address: toby@dr-qubit.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12685 Cc: egnarts-ms , 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Stefan, On Fri, Jul 26, 2013 at 12:09:05PM -0400, Stefan Monnier wrote: > > Conditional breakpoints whose condition refers to a lexically-scoped > > variable fail with a "Symbol's value as variable is void" error. > > This is almost certainly caused by the same issue as > > http://thread.gmane.org/gmane.emacs.devel/150556 > > I've just installed a patch into trunk which should make Edebug properly > use the lexical scope of the debugged code (when applicable). > > Could you confirm it fixes this bug? I just checked out and recompiled Emacs from bzr and tested. I'm still seeing the same bug as before. Steps to reproduce: 1. Open the attached elisp file 2. Instrument `test' for edebug: "C-u C-M-x" 3. Evaluate `test': "M-: (test 3)" 4. Evaluate lexical variable from within edebug: "M-: arg " -> backtrace buffer with "Debugger entered--Lisp error: (void-variable arg)" 3'. Create conditional breakpoint in `test': "C-x X x (null arg) " 4'. Evaluate `test': "M-: (test 3)" -> message "Symbol's value as variable is void: arg" Best, Toby -- Dr T. S. Cubitt Royal Society University Research Fellow Centre for Quantum Information and Foundations DAMTP, University of Cambridge email: tsc25@cantab.net web: www.dr-qubit.org --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="test.el" ;;; -*- lexical-binding: t; -*- (defun test (arg) (dotimes (i arg) (message "%s" i))) --9jxsPFA5p3P2qPhR-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 05 13:27:21 2013 Received: (at 12685) by debbugs.gnu.org; 5 Aug 2013 17:27:21 +0000 Received: from localhost ([127.0.0.1]:41566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V6OYy-0002XV-Ow for submit@debbugs.gnu.org; Mon, 05 Aug 2013 13:27:20 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:13252) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V6OYw-0002XH-Ac for 12685@debbugs.gnu.org; Mon, 05 Aug 2013 13:27:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxKix/2dsb2JhbABEvw4Xc4IeAQEEAScvIwULCw4mEhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFFFxKix/2dsb2JhbABEvw4Xc4IeAQEEAScvIwULCw4mEhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20600356" Received: from 69-196-168-177.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.177]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 Aug 2013 13:27:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id C60FE62E1A; Mon, 5 Aug 2013 13:27:11 -0400 (EDT) From: Stefan Monnier To: Toby Cubitt Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: References: <20130805151446.GA12256@c3po> Date: Mon, 05 Aug 2013 13:27:11 -0400 In-Reply-To: <20130805151446.GA12256@c3po> (Toby Cubitt's message of "Mon, 5 Aug 2013 16:14:46 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 12685 Cc: egnarts-ms , 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > 4. Evaluate lexical variable from within edebug: "M-: arg " > -> backtrace buffer with "Debugger entered--Lisp error: (void-variable arg)" That's because you use M-:. If you want to run your code within the context of the debugged program, you need to use `e'. > 3'. Create conditional breakpoint in `test': "C-x X x (null arg) " > 4'. Evaluate `test': "M-: (test 3)" > -> message "Symbol's value as variable is void: arg" Aha, that OTOH should work, indeed. I'll get back to you when I fix it, Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 08 19:19:18 2013 Received: (at 12685) by debbugs.gnu.org; 8 Aug 2013 23:19:18 +0000 Received: from localhost ([127.0.0.1]:48176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V7ZUD-0006jV-QP for submit@debbugs.gnu.org; Thu, 08 Aug 2013 19:19:18 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:63575) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V7ZU9-0006jG-Tb for 12685@debbugs.gnu.org; Thu, 08 Aug 2013 19:19:16 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/Nq/2dsb2JhbABEuzWDWRdzgh4BAQQBJy8jBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMTgUok X-IPAS-Result: Av8EABK/CFFLd/Nq/2dsb2JhbABEuzWDWRdzgh4BAQQBJy8jBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMTgUok X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="21142223" Received: from 75-119-243-106.dsl.teksavvy.com (HELO pastel.home) ([75.119.243.106]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Aug 2013 19:19:01 -0400 Received: by pastel.home (Postfix, from userid 20848) id C7A2D62CCA; Thu, 8 Aug 2013 19:19:07 -0400 (EDT) From: Stefan Monnier To: Toby Cubitt Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: References: <20130805151446.GA12256@c3po> Date: Thu, 08 Aug 2013 19:19:07 -0400 In-Reply-To: <20130805151446.GA12256@c3po> (Toby Cubitt's message of "Mon, 5 Aug 2013 16:14:46 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 12685 Cc: egnarts-ms , 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > 3'. Create conditional breakpoint in `test': "C-x X x (null arg) " > 4'. Evaluate `test': "M-: (test 3)" > -> message "Symbol's value as variable is void: arg" I just installed the patch below which seems to fix this problem. Stefan === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2013-08-05 14:26:57 +0000 +++ lisp/emacs-lisp/edebug.el 2013-08-08 23:10:08 +0000 @@ -2314,8 +2314,7 @@ (if edebug-global-break-condition (condition-case nil (setq edebug-global-break-result - ;; FIXME: lexbind. - (eval edebug-global-break-condition)) + (edebug-eval edebug-global-break-condition)) (error nil)))) (edebug-break)) @@ -2326,8 +2325,7 @@ (and edebug-break-data (or (not edebug-break-condition) (setq edebug-break-result - ;; FIXME: lexbind. - (eval edebug-break-condition)))))) + (edebug-eval edebug-break-condition)))))) (if (and edebug-break (nth 2 edebug-break-data)) ; is it temporary? ;; Delete the breakpoint. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 09 07:02:34 2013 Received: (at 12685) by debbugs.gnu.org; 9 Aug 2013 11:02:34 +0000 Received: from localhost ([127.0.0.1]:49033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V7kSo-0006HP-5R for submit@debbugs.gnu.org; Fri, 09 Aug 2013 07:02:34 -0400 Received: from sanddollar.geekisp.com ([216.168.135.167]:41510) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1V7kSk-0006H8-J2 for 12685@debbugs.gnu.org; Fri, 09 Aug 2013 07:02:31 -0400 Received: (qmail 23898 invoked by uid 1003); 9 Aug 2013 11:02:24 -0000 Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Fri, 09 Aug 2013 07:02:22 -0400 Date: Fri, 9 Aug 2013 12:02:20 +0100 To: Stefan Monnier Subject: Re: bug#12685: 24.2; lexical binding breaks edebug conditional breakpoints Message-ID: <20130809110220.GA20369@c3po> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.dr-qubit.org/gpg-toby-pub.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) From: Toby Cubitt X-Primary-Address: toby@dr-qubit.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12685 Cc: egnarts-ms , 12685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Thu, Aug 08, 2013 at 07:19:07PM -0400, Stefan Monnier wrote: > > 3'. Create conditional breakpoint in `test': "C-x X x (null arg) " > > > 4'. Evaluate `test': "M-: (test 3)" > > -> message "Symbol's value as variable is void: arg" > > I just installed the patch below which seems to fix this problem. Works for me. Thanks! Toby -- Dr T. S. Cubitt Royal Society University Research Fellow Centre for Quantum Information and Foundations DAMTP, University of Cambridge email: tsc25@cantab.net web: www.dr-qubit.org From unknown Fri Jun 20 07:27:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 06 Sep 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator