X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Glenn Morris <rgm@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 11 Apr 2012 03:39:01 +0000 Resent-Message-ID: <handler.11218.B.133411549117460 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11218 <at> debbugs.gnu.org X-Debbugs-Original-To: submit <at> debbugs.gnu.org Received: via spool by submit <at> debbugs.gnu.org id=B.133411549117460 (code B ref -1); Wed, 11 Apr 2012 03:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Apr 2012 03:38:11 +0000 Received: from localhost ([127.0.0.1]:49822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SHoNm-0004XZ-Mx for submit <at> debbugs.gnu.org; Tue, 10 Apr 2012 23:38:10 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:51033) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1SHoNl-0004XR-3F for submit <at> debbugs.gnu.org; Tue, 10 Apr 2012 23:38:09 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1SHoMh-00041a-Bq; Tue, 10 Apr 2012 23:37:03 -0400 From: Glenn Morris <rgm@HIDDEN> X-Spook: airframe NATO industrial intelligence CIDA M-14 Islam X-Ran: ~'KDhM<zsk%Q*Z3~,Lm5blcB8{"BYZP|_3;$+{YGM/qYN7m[^z7vo12;{/z:|If:r?4L*M X-Hue: white X-Attribution: GM Date: Tue, 10 Apr 2012 23:37:03 -0400 Message-ID: <qeobqzc528.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) Package: emacs Version: 24.0.95 with-demoted-errors use of condition-case-unless-debug is annoying. If I want to debug a condition-case, I'll set debug-on-signal non-nil. As it stands, with-demoted-errors is not useful if you want to write an ERT test (for reasons I haven't investigated). (defun foo () (with-demoted-errors (error "error!")) t) (ert-deftest test-foo () "Test foo" (should (foo))) M-x ert RET test-foo RET Selector: test-foo Passed: 0 Failed: 1 (1 unexpected) Total: 1/1 If you replace with-demoted-errors with ignore-errors, the test passes.
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Lars Magne Ingebrigtsen <larsi@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 11 Apr 2012 12:05:02 +0000 Resent-Message-ID: <handler.11218.B11218.133414587728381 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris <rgm@HIDDEN> Cc: 11218 <at> debbugs.gnu.org Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133414587728381 (code B ref 11218); Wed, 11 Apr 2012 12:05:02 +0000 Received: (at 11218) by debbugs.gnu.org; 11 Apr 2012 12:04:37 +0000 Received: from localhost ([127.0.0.1]:50540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SHwHr-0007Nf-Fu for submit <at> debbugs.gnu.org; Wed, 11 Apr 2012 08:04:37 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:54613) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <larsi@HIDDEN>) id 1SHwHo-0007NW-CE for 11218 <at> debbugs.gnu.org; Wed, 11 Apr 2012 08:04:33 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from <larsi@HIDDEN>) id 1SHwGX-0001WV-ES; Wed, 11 Apr 2012 14:03:13 +0200 From: Lars Magne Ingebrigtsen <larsi@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVLIARmJwoqFAAkEACd diQ0CQExFwE9GwInEwBOHQXb9tWfAAACUElEQVQ4jWWUsW7bMBCG6aKIkU0sDLvZ0ktBqFtrDVE3 KyDsB+gL2KxxymijhtiOlYCCYwx00dv2P1KOneZgyOJ94s/j8ZeUvoii+GJtZSfW2gcliWPK90Xx +QyK/yIQMTORgG8vQEuGjaPXM1qK8QqUIUCNDEDoTg8jKUOZxKrANRL8G6I2CAgAJCVIcAqiEEfK YOBi3iOaOIhSGAOZlD+RAfha0vsbpUZ25pMeK+9/pWf/Wq0tQHMCe1shveuPtprYSo1907AzAGhZ Nr5GD6V3FX5xDgCGN3jcxqZKzBLYRdBre4pq7C9AEkqxEK06rhGVziE7A/DHp+vJCyB78UpKHdkL JW1XwwzvDygrHXumVDVaYZE6tmTn/aLv+yeF8IdxWkNKq/1+lrhcV7KPBLg++Gbobe0nfAac8Tm2 S5aqnNzfTqVvOAo5GK4ikLOjjzianJJxHG3jzgnPuiwPXdmVba7FCGY6AF4/kICQh/tlgHk2EUBr 68RQYrbidwf33l6hu7JGRV0yXUgmNRE43ixpcGP8K4NZA6C0Q0PPUvFKmCKGWzDAJrswvFFiUSjR RmffkUqCJdHaQ+rg8nCVcoMicb0CWLm8SwW1ca2yhLxWvH1HuWTnoeU6kvAHnVQ8gVIXZdqZ7uVe ZqxVvXSUR0BG75dvcI+mYB9buP4ZbLNpPry4KsspxDW61ui3emruElHv8Zam8ufR1dpmoYYn1Af0 7x7OhUkBKtVw+RgCN+rTXdHdO/auKL4e9bTe/VyPlV08Xn4A5tT/eB68+jKc4h8qGFCeoM4P9QAA AABJRU5ErkJggg== X-Now-Playing: Zazou, Bikaye & Cy1's _Noir et Blanc_: "M'Pasi Ya M'Pamba" Date: Wed, 11 Apr 2012 14:03:12 +0200 In-Reply-To: <qeobqzc528.fsf@HIDDEN> (Glenn Morris's message of "Tue, 10 Apr 2012 23:37:03 -0400") Message-ID: <m3r4vuo4qn.fsf@HIDDEN> User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1SHwGX-0001WV-ES X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@HIDDEN MailScanner-NULL-Check: 1334750593.88855@yMGcLUixYD8xQ4QLg0o0jQ X-Spam-Status: No X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.9 (-) Glenn Morris <rgm@HIDDEN> writes: > with-demoted-errors use of condition-case-unless-debug is annoying. > If I want to debug a condition-case, I'll set debug-on-signal non-nil. > As it stands, with-demoted-errors is not useful if you want to write an > ERT test (for reasons I haven't investigated). Isn't this an ERT bug, then? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 11 Apr 2012 13:04:01 +0000 Resent-Message-ID: <handler.11218.B11218.13341493927898 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris <rgm@HIDDEN> Cc: 11218 <at> debbugs.gnu.org Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.13341493927898 (code B ref 11218); Wed, 11 Apr 2012 13:04:01 +0000 Received: (at 11218) by debbugs.gnu.org; 11 Apr 2012 13:03:12 +0000 Received: from localhost ([127.0.0.1]:50730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SHxCa-00023L-0y for submit <at> debbugs.gnu.org; Wed, 11 Apr 2012 09:03:12 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:7187) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <monnier@HIDDEN>) id 1SHxCY-00023E-9O for 11218 <at> debbugs.gnu.org; Wed, 11 Apr 2012 09:03:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUIACxOgk9FxL8q/2dsb2JhbABDuCMDgQyBCIIKAQVWIxALDiYSFBgNJIghtjKLYYR5BKRFgV2DAw X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="173303635" Received: from 69-196-191-42.dsl.teksavvy.com (HELO pastel.home) ([69.196.191.42]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Apr 2012 09:02:02 -0400 Received: by pastel.home (Postfix, from userid 20848) id 69C8758D2B; Wed, 11 Apr 2012 09:02:02 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> Date: Wed, 11 Apr 2012 09:02:02 -0400 In-Reply-To: <qeobqzc528.fsf@HIDDEN> (Glenn Morris's message of "Tue, 10 Apr 2012 23:37:03 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.9 (-) > (defun foo () > (with-demoted-errors (error "error!")) > t) > > (ert-deftest test-foo () > "Test foo" > (should (foo))) > > M-x ert RET test-foo RET > > Selector: test-foo > Passed: 0 > Failed: 1 (1 unexpected) > Total: 1/1 > > If you replace with-demoted-errors with ignore-errors, the test passes. Looks like a bug in ERT. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Glenn Morris <rgm@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 11 Apr 2012 16:18:02 +0000 Resent-Message-ID: <handler.11218.B11218.13341610656788 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Magne Ingebrigtsen <larsi@HIDDEN> Cc: 11218 <at> debbugs.gnu.org Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.13341610656788 (code B ref 11218); Wed, 11 Apr 2012 16:18:02 +0000 Received: (at 11218) by debbugs.gnu.org; 11 Apr 2012 16:17:45 +0000 Received: from localhost ([127.0.0.1]:52311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SI0Eq-0001lR-DI for submit <at> debbugs.gnu.org; Wed, 11 Apr 2012 12:17:44 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:42826) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1SI0Eo-0001lK-5w for 11218 <at> debbugs.gnu.org; Wed, 11 Apr 2012 12:17:42 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1SI0Df-0006oj-MJ; Wed, 11 Apr 2012 12:16:31 -0400 From: Glenn Morris <rgm@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <m3r4vuo4qn.fsf@HIDDEN> X-Spook: cryptographic Perl-RSA Mena InfoSec ammunition Blowpipe X-Ran: vE&'1.qGylTdd1c%HT}txUhF!eJ3=4m\adln[RC(-w8fNV4SDUqwirDQg(TUh@@q,ukL9c X-Hue: green X-Attribution: GM Date: Wed, 11 Apr 2012 12:16:31 -0400 In-Reply-To: <m3r4vuo4qn.fsf@HIDDEN> (Lars Magne Ingebrigtsen's message of "Wed, 11 Apr 2012 14:03:12 +0200") Message-ID: <hc62d68crk.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.7 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -5.7 (-----) >> If I want to debug a condition-case, I'll set debug-on-signal non-nil. That's not an ert bug. :)
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Glenn Morris <rgm@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 11 Apr 2012 16:30:02 +0000 Resent-Message-ID: <handler.11218.B11218.13341617797920 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Magne Ingebrigtsen <larsi@HIDDEN> Cc: 11218 <at> debbugs.gnu.org Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.13341617797920 (code B ref 11218); Wed, 11 Apr 2012 16:30:02 +0000 Received: (at 11218) by debbugs.gnu.org; 11 Apr 2012 16:29:39 +0000 Received: from localhost ([127.0.0.1]:52330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SI0QL-00023g-Vj for submit <at> debbugs.gnu.org; Wed, 11 Apr 2012 12:29:39 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:43373) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1SI0QK-00023Y-1x for 11218 <at> debbugs.gnu.org; Wed, 11 Apr 2012 12:29:36 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1SI0PD-0007mU-BH; Wed, 11 Apr 2012 12:28:27 -0400 From: Glenn Morris <rgm@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <m3r4vuo4qn.fsf@HIDDEN> <hc62d68crk.fsf@HIDDEN> X-Spook: Hamas INS Jiang Zemin terrorist ASPIC PET spy ASDIC X-Ran: )tvtL,$mrTHydY2z51{`\bTu:R.*/F+[2KqWw0isPesPRC9{jXS.JxC85Rl,y{N]AvGAB& X-Hue: cyan X-Attribution: GM Date: Wed, 11 Apr 2012 12:28:27 -0400 In-Reply-To: <hc62d68crk.fsf@HIDDEN> (Glenn Morris's message of "Wed, 11 Apr 2012 12:16:31 -0400") Message-ID: <ohiph6kzbo.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) Glenn Morris wrote: >>> If I want to debug a condition-case, I'll set debug-on-signal non-nil. > > That's not an ert bug. :) To expand: why does with-demoted-errors use a different form of condition-case, and hence treat debugging differently, to the pre-existing ignore-errors? The former doesn't let you have control; the latter does.
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 11 Apr 2012 17:59:02 +0000 Resent-Message-ID: <handler.11218.B11218.133416711616098 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris <rgm@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Lars Magne Ingebrigtsen <larsi@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133416711616098 (code B ref 11218); Wed, 11 Apr 2012 17:59:02 +0000 Received: (at 11218) by debbugs.gnu.org; 11 Apr 2012 17:58:36 +0000 Received: from localhost ([127.0.0.1]:52469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SI1oR-0004Bb-Nw for submit <at> debbugs.gnu.org; Wed, 11 Apr 2012 13:58:35 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:53854) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <monnier@HIDDEN>) id 1SI1oP-0004BO-SC for 11218 <at> debbugs.gnu.org; Wed, 11 Apr 2012 13:58:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUIACxOgk9FxL8q/2dsb2JhbABDuCMDgQyBCIIKAQVWIxALDiYSFBgNJIghtjKLYYR5BKRFgV2DAw X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="173409529" Received: from 69-196-191-42.dsl.teksavvy.com (HELO pastel.home) ([69.196.191.42]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Apr 2012 13:57:25 -0400 Received: by pastel.home (Postfix, from userid 20848) id DB6F558D2B; Wed, 11 Apr 2012 13:57:24 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvsjga888i.fsf-monnier+emacs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <m3r4vuo4qn.fsf@HIDDEN> <hc62d68crk.fsf@HIDDEN> <ohiph6kzbo.fsf@HIDDEN> Date: Wed, 11 Apr 2012 13:57:24 -0400 In-Reply-To: <ohiph6kzbo.fsf@HIDDEN> (Glenn Morris's message of "Wed, 11 Apr 2012 12:28:27 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.9 (-) >>>> If I want to debug a condition-case, I'll set debug-on-signal non-nil. >> That's not an ert bug. :) > To expand: why does with-demoted-errors use a different form of > condition-case, and hence treat debugging differently, to the > pre-existing ignore-errors? The former doesn't let you have control; the > latter does. debug-on-signal is inconvenient because it triggers in many cases where it shouldn't (because the error is actually normal and handled properly). `with-demoted-errors' doesn't actually *handle* the error, it just demotes it so as not to annoy the user. So I find it makes sense to get into the debugger when an error is demoted and the user has asked to enter debugger on error. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Glenn Morris <rgm@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Apr 2012 00:18:01 +0000 Resent-Message-ID: <handler.11218.B11218.133427623412113 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 11218 <at> debbugs.gnu.org Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133427623412113 (code B ref 11218); Fri, 13 Apr 2012 00:18:01 +0000 Received: (at 11218) by debbugs.gnu.org; 13 Apr 2012 00:17:14 +0000 Received: from localhost ([127.0.0.1]:55211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SIUCP-00039J-TK for submit <at> debbugs.gnu.org; Thu, 12 Apr 2012 20:17:14 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:56683) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1SIUCO-00039D-24 for 11218 <at> debbugs.gnu.org; Thu, 12 Apr 2012 20:17:12 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1SIUB9-0005YH-3B; Thu, 12 Apr 2012 20:15:55 -0400 From: Glenn Morris <rgm@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> X-Spook: Bruxelles explosion Albright assassinate AVIP Ermes X-Ran: {5YrsyWknXW%FTa9w)~sdMY,Dd'o:+MYrv]eX_L[Qk,$!BRs^8V_2C,N@5vqGF0@(+Vm+G X-Hue: blue X-Attribution: GM Date: Thu, 12 Apr 2012 20:15:54 -0400 In-Reply-To: <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message of "Wed, 11 Apr 2012 09:02:02 -0400") Message-ID: <jity0oo5ad.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.7 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -5.7 (-----) Stefan Monnier wrote: >> If you replace with-demoted-errors with ignore-errors, the test passes. > > Looks like a bug in ERT. I don't know if it's a "bug" per se... ert--run-test-internal binds debug-on-error to t, and redefines the debugger to ert--run-test-debugger. As the doc of that function says: This function records failures and errors and either terminates the test silently or calls the interactive debugger, as appropriate. (Whether or not the "real" debugger is invoked depends on the value of ert-debug-on-error.) So basically AFAICS it's an ert design choice that it works by borrowing the debugger. I don't imagine it would be easy to change that.
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Apr 2012 13:46:01 +0000 Resent-Message-ID: <handler.11218.B11218.13343247582708 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Ohler <ohler@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.13343247582708 (code B ref 11218); Fri, 13 Apr 2012 13:46:01 +0000 Received: (at 11218) by debbugs.gnu.org; 13 Apr 2012 13:45:58 +0000 Received: from localhost ([127.0.0.1]:56376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SIgp3-0000hb-VX for submit <at> debbugs.gnu.org; Fri, 13 Apr 2012 09:45:58 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:50772) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <monnier@HIDDEN>) id 1SIgp2-0000hV-G5 for 11218 <at> debbugs.gnu.org; Fri, 13 Apr 2012 09:45:56 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUIACxOgk9sr+di/2dsb2JhbABDuCMDgQyBCIIJAQEEAVYjEAs0EhQYDSSIHAW2MothhHkEpEWBXYMD X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="174058786" Received: from 108-175-231-98.dsl.teksavvy.com (HELO pastel.home) ([108.175.231.98]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Apr 2012 09:44:37 -0400 Received: by pastel.home (Postfix, from userid 20848) id 408AE5809E; Fri, 13 Apr 2012 09:44:37 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> Date: Fri, 13 Apr 2012 09:44:37 -0400 In-Reply-To: <jity0oo5ad.fsf@HIDDEN> (Glenn Morris's message of "Thu, 12 Apr 2012 20:15:54 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.9 (-) >>> If you replace with-demoted-errors with ignore-errors, the test passes. >> Looks like a bug in ERT. > I don't know if it's a "bug" per se... > ert--run-test-internal binds debug-on-error to t, and redefines the > debugger to ert--run-test-debugger. As the doc of that function says: I wonder why ERT doesn't just use condition-case to catch and record the errors. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Christian Ohler <ohler@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 17 Apr 2012 21:45:02 +0000 Resent-Message-ID: <handler.11218.B11218.13346990821328 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.13346990821328 (code B ref 11218); Tue, 17 Apr 2012 21:45:02 +0000 Received: (at 11218) by debbugs.gnu.org; 17 Apr 2012 21:44:42 +0000 Received: from localhost ([127.0.0.1]:38796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SKGCW-0000LK-FD for submit <at> debbugs.gnu.org; Tue, 17 Apr 2012 17:44:42 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:54585 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <ohler@HIDDEN>) id 1SKFzU-0008TO-Rt for 11218 <at> debbugs.gnu.org; Tue, 17 Apr 2012 17:31:13 -0400 Received: from [2620:0:1002:1009:e2f8:47ff:fe38:3bc8] (port=56155 helo=dhcp-172-31-155-154.sfo.corp.google.com) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <ohler@HIDDEN>) id 1SKFzJ-0001nK-Ek; Tue, 17 Apr 2012 17:31:01 -0400 Message-ID: <4F8DE112.5010106@HIDDEN> Date: Tue, 17 Apr 2012 14:30:58 -0700 From: Christian Ohler <ohler@HIDDEN> MIME-Version: 1.0 References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> In-Reply-To: <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -6.9 (------) X-Mailman-Approved-At: Tue, 17 Apr 2012 17:44:39 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) On 4/13/12 6:44 AM, Stefan Monnier wrote: >>>> If you replace with-demoted-errors with ignore-errors, the test passes. >>> Looks like a bug in ERT. >> I don't know if it's a "bug" per se... >> ert--run-test-internal binds debug-on-error to t, and redefines the >> debugger to ert--run-test-debugger. As the doc of that function says: > > I wonder why ERT doesn't just use condition-case to catch and record > the errors. Two reasons that I remember off the top of my head: Recording backtraces, and recording additional information provided with `ert-info'. Using condition-case would let ERT regain control only after the stack is unwound, at which point that information is gone. Christian.
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 19 Apr 2012 07:47:01 +0000 Resent-Message-ID: <handler.11218.B11218.133482158926545 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Ohler <ohler@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133482158926545 (code B ref 11218); Thu, 19 Apr 2012 07:47:01 +0000 Received: (at 11218) by debbugs.gnu.org; 19 Apr 2012 07:46:29 +0000 Received: from localhost ([127.0.0.1]:40803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SKm4T-0006u5-9W for submit <at> debbugs.gnu.org; Thu, 19 Apr 2012 03:46:29 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:51682) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <monnier@HIDDEN>) id 1SKm4Q-0006tw-TO for 11218 <at> debbugs.gnu.org; Thu, 19 Apr 2012 03:46:27 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q3J7k6Ou002687; Thu, 19 Apr 2012 03:46:07 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 64141AE152; Thu, 19 Apr 2012 03:46:04 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> Date: Thu, 19 Apr 2012 03:46:04 -0400 In-Reply-To: <4F8DE112.5010106@HIDDEN> (Christian Ohler's message of "Tue, 17 Apr 2012 14:30:58 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4196=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4196> : streams <748125> : uri <1100874> X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -3.5 (---) >>>>> If you replace with-demoted-errors with ignore-errors, the test passes. >>>> Looks like a bug in ERT. >>> I don't know if it's a "bug" per se... >>> ert--run-test-internal binds debug-on-error to t, and redefines the >>> debugger to ert--run-test-debugger. As the doc of that function says: >> I wonder why ERT doesn't just use condition-case to catch and record >> the errors. > Two reasons that I remember off the top of my head: Recording backtraces, > and recording additional information provided with `ert-info'. So the next question is: why does ERT record a backtrace and that extra information provided by ert-info? Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Christian Ohler <ohler@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 20 Apr 2012 03:10:02 +0000 Resent-Message-ID: <handler.11218.B11218.133489139913974 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133489139913974 (code B ref 11218); Fri, 20 Apr 2012 03:10:02 +0000 Received: (at 11218) by debbugs.gnu.org; 20 Apr 2012 03:09:59 +0000 Received: from localhost ([127.0.0.1]:43150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SL4ER-0003dI-51 for submit <at> debbugs.gnu.org; Thu, 19 Apr 2012 23:09:59 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:42423 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <ohler@HIDDEN>) id 1SL4EO-0003cy-T2 for 11218 <at> debbugs.gnu.org; Thu, 19 Apr 2012 23:09:57 -0400 Received: from [204.14.153.109] (port=35838 helo=kamel.local) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <ohler@HIDDEN>) id 1SL4E0-00075V-MS; Thu, 19 Apr 2012 23:09:33 -0400 Message-ID: <4F90D369.7070005@HIDDEN> Date: Thu, 19 Apr 2012 20:09:29 -0700 From: Christian Ohler <ohler@HIDDEN> MIME-Version: 1.0 References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> In-Reply-To: <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) Stefan Monnier, 2012-04-19: >>>>>> If you replace with-demoted-errors with ignore-errors, the test passes. >>>>> Looks like a bug in ERT. >>>> I don't know if it's a "bug" per se... >>>> ert--run-test-internal binds debug-on-error to t, and redefines the >>>> debugger to ert--run-test-debugger. As the doc of that function says: >>> I wonder why ERT doesn't just use condition-case to catch and record >>> the errors. >> Two reasons that I remember off the top of my head: Recording backtraces, >> and recording additional information provided with `ert-info'. > > So the next question is: why does ERT record a backtrace and that extra > information provided by ert-info? To be able to show them to the user, together with the test failure. If you have one or more failing tests, it's much more useful to see the error messages and backtraces rather than just the error messages. Unless there's another way to accomplish this, I think it makes sense for ERT to bind `debugger'. Since `debugger' is only called if `debug-on-error' is set, ERT has to bind that, too. I'm not sure where that leaves us. You could say the problem is that `debug-on-error' is overloaded with two different meanings (one in eval.c, one in `condition-case-no-debug'), or you could say that ERT wants a different `debugger' hook that does not depend on `debug-on-errors'. But perhaps `with-demoted-errors' and its interaction with `debug-on-error' is inherently problematic -- how would we like it to interact with tests and debugging? Assuming ERT did not rebind `debug-on-error', the test (ert-deftest foo () (with-demoted-errors (error "a")) (error "b")) would normally fail with "b", but if we enable debugging to track down why, it will fail with "a" instead (with no way to continue execution to get to the error we are interested in). Confusing. As far as ERT tests are concerned, one could argue that the current behavior (always fail with "a") is preferable because it's more consistent; it just means that errors in tests can't be demoted. Fundamentally, having conditionals in the code that explicitly check `debug-on-error' seems like asking for trouble. If the program checks "am I being debugged" and behaves differently in that case, we should expect testing and debugging tools to break... And ERT is not the only tool that triggers the problem: While investigating this bug, I set `debug-on-error' to nil globally, typed M-: (with-demoted-errors (error "foo")) RET, and was confused for a moment that I found myself in the debugger with error "foo" -- `with-demoted-errors' had no effect. This is because M-: rebinds `debug-on-error' (at least by default). Just like ERT. Edebug does the same, too. Christian.
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 20 Apr 2012 12:14:01 +0000 Resent-Message-ID: <handler.11218.B11218.133492403830713 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Ohler <ohler@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133492403830713 (code B ref 11218); Fri, 20 Apr 2012 12:14:01 +0000 Received: (at 11218) by debbugs.gnu.org; 20 Apr 2012 12:13:58 +0000 Received: from localhost ([127.0.0.1]:43733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SLCip-0007zF-IE for submit <at> debbugs.gnu.org; Fri, 20 Apr 2012 08:13:57 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:40683) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <monnier@HIDDEN>) id 1SLCim-0007z7-Ju for 11218 <at> debbugs.gnu.org; Fri, 20 Apr 2012 08:13:54 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q3KCDQel020176; Fri, 20 Apr 2012 08:13:27 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 562E5AE201; Fri, 20 Apr 2012 08:13:25 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvzka61udx.fsf-monnier+emacs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> <4F90D369.7070005@HIDDEN> Date: Fri, 20 Apr 2012 08:13:25 -0400 In-Reply-To: <4F90D369.7070005@HIDDEN> (Christian Ohler's message of "Thu, 19 Apr 2012 20:09:29 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4197=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4197> : streams <748467> : uri <1101375> X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -3.5 (---) >> So the next question is: why does ERT record a backtrace and that extra >> information provided by ert-info? > To be able to show them to the user, together with the test failure. If you > have one or more failing tests, it's much more useful to see the error > messages and backtraces rather than just the error messages. I don't see the point of showing that info when running the tests. If the user wants that info, he should be able to easily say "run this test with debug-on-error" so he doesn't only get a backtrace but also gets put in the debugger where he can inspect the state. > (ert-deftest foo () > (with-demoted-errors (error "a")) > (error "b")) > would normally fail with "b", but if we enable debugging to track down why, > it will fail with "a" instead (with no way to continue execution to get to > the error we are interested in). No: you'll be put in the debugger for the error "a" but if you hit `c' it will continue and re-enter the debugger for error "b". > Fundamentally, having conditionals in the code that explicitly check > debug-on-error' seems like asking for trouble. I agree it's not something we should do in general, but with-demoted-error was designed largely for the specific case where errors should not happen (i.e. if one happens, we want to be able to debug it easily by setting debug-on-error), but at the same time you know very well how the program should respond in case of an unexpected error (so the user who's not in a position to fix the bug can get his job done). Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Christian Ohler <ohler@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 20 Apr 2012 21:04:01 +0000 Resent-Message-ID: <handler.11218.B11218.133495579224965 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133495579224965 (code B ref 11218); Fri, 20 Apr 2012 21:04:01 +0000 Received: (at 11218) by debbugs.gnu.org; 20 Apr 2012 21:03:12 +0000 Received: from localhost ([127.0.0.1]:44731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SLKz2-0006Uc-1g for submit <at> debbugs.gnu.org; Fri, 20 Apr 2012 17:03:12 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39783 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <ohler@HIDDEN>) id 1SLKyz-0006UV-VV for 11218 <at> debbugs.gnu.org; Fri, 20 Apr 2012 17:03:10 -0400 Received: from [2620:0:1002:1009:e2f8:47ff:fe38:3bc8] (port=52984 helo=dhcp-172-31-155-154.sfo.corp.google.com) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <ohler@HIDDEN>) id 1SLKyY-0000AQ-5L; Fri, 20 Apr 2012 17:02:42 -0400 Message-ID: <4F91CEEF.20305@HIDDEN> Date: Fri, 20 Apr 2012 14:02:39 -0700 From: Christian Ohler <ohler@HIDDEN> MIME-Version: 1.0 References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> <4F90D369.7070005@HIDDEN> <jwvzka61udx.fsf-monnier+emacs@HIDDEN> In-Reply-To: <jwvzka61udx.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) On 4/20/12 5:13 AM, Stefan Monnier wrote: >>> So the next question is: why does ERT record a backtrace and that extra >>> information provided by ert-info? >> To be able to show them to the user, together with the test failure. If you >> have one or more failing tests, it's much more useful to see the error >> messages and backtraces rather than just the error messages. > > I don't see the point of showing that info when running the tests. > If the user wants that info, he should be able to easily say "run this > test with debug-on-error" so he doesn't only get a backtrace but also > gets put in the debugger where he can inspect the state. ERT's keyboard shortcut for that is "d". But it's not a good solution if: * the test is nondeterministic (maybe due to subprocess interaction), * the test takes a long time to run, * you have multiple failing tests and want to quickly compare if they are crashing in the same place, * ERT is running in batch mode (e.g. make check). It's better to collect as much data as reasonably possible when the error first occurs. >> (ert-deftest foo () >> (with-demoted-errors (error "a")) >> (error "b")) > >> would normally fail with "b", but if we enable debugging to track down why, >> it will fail with "a" instead (with no way to continue execution to get to >> the error we are interested in). > > No: you'll be put in the debugger for the error "a" but if you hit `c' > it will continue and re-enter the debugger for error "b". My Emacs is a few months old, but that doesn't work for me. Has it changed recently? I'm using (defun foo () (with-demoted-errors (error "a")) (error "b")) and typing C-u <escape> C-x <escape> : ( f o o ) <return> c c and all I find in *Messages* is error: "a" Continue... edebug-signal: a No mention of "b". If `debug-on-error' is t, `with-demoted-errors' becomes essentially equivalent to `progn', and (error "b") can ever be reached in (defun foo () (progn (error "a")) (error "b")) since `error' never returns (and I think that's an important guarantee that the debugger shouldn't violate, at least not without confirmation). Christian.
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 21 Apr 2012 02:36:02 +0000 Resent-Message-ID: <handler.11218.B11218.133497571322384 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Ohler <ohler@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133497571322384 (code B ref 11218); Sat, 21 Apr 2012 02:36:02 +0000 Received: (at 11218) by debbugs.gnu.org; 21 Apr 2012 02:35:13 +0000 Received: from localhost ([127.0.0.1]:44877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SLQAK-0005oy-RC for submit <at> debbugs.gnu.org; Fri, 20 Apr 2012 22:35:13 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:41404) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <monnier@HIDDEN>) id 1SLQAI-0005ok-T8 for 11218 <at> debbugs.gnu.org; Fri, 20 Apr 2012 22:35:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYIACxOgk/O+K5t/2dsb2JhbABDuCMDgQyBCIIJAQEEAVYjBQsLNBIUGA0kLoduBbYyi2GEeQSkRYFdgwM X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="175683849" Received: from 206-248-174-109.dsl.teksavvy.com (HELO pastel.home) ([206.248.174.109]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Apr 2012 22:34:36 -0400 Received: by pastel.home (Postfix, from userid 20848) id D2DE558E55; Fri, 20 Apr 2012 22:34:34 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvsjfxstne.fsf-monnier+emacs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> <4F90D369.7070005@HIDDEN> <jwvzka61udx.fsf-monnier+emacs@HIDDEN> <4F91CEEF.20305@HIDDEN> Date: Fri, 20 Apr 2012 22:34:34 -0400 In-Reply-To: <4F91CEEF.20305@HIDDEN> (Christian Ohler's message of "Fri, 20 Apr 2012 14:02:39 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.9 (-) >> I don't see the point of showing that info when running the tests. >> If the user wants that info, he should be able to easily say "run this >> test with debug-on-error" so he doesn't only get a backtrace but also >> gets put in the debugger where he can inspect the state. > ERT's keyboard shortcut for that is "d". But it's not a good solution if: > * the test is nondeterministic (maybe due to subprocess interaction), > * the test takes a long time to run, > * you have multiple failing tests and want to quickly compare if they are > crashing in the same place, > * ERT is running in batch mode (e.g. make check). > It's better to collect as much data as reasonably possible when the error > first occurs. None of these arguments are really specific to ERT. It just seems like you like to run with debug-on-error, which is fine (I do too). But don't impose it on all ERT users. >> No: you'll be put in the debugger for the error "a" but if you hit `c' >> it will continue and re-enter the debugger for error "b". > My Emacs is a few months old, but that doesn't work for me. Has it > changed recently? [...] > If `debug-on-error' is t, `with-demoted-errors' becomes essentially > equivalent to `progn', and (error "b") can ever be reached in You're right, sorry: brain malfunction. But that just means you first have to fix the bug that signals "a" before getting to the bug that signals "b". Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Lennart Borgman <lennart.borgman@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 23 Apr 2012 13:29:02 +0000 Resent-Message-ID: <handler.11218.B11218.133518769628760 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Christian Ohler <ohler@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133518769628760 (code B ref 11218); Mon, 23 Apr 2012 13:29:02 +0000 Received: (at 11218) by debbugs.gnu.org; 23 Apr 2012 13:28:16 +0000 Received: from localhost ([127.0.0.1]:48610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SMJJM-0007Tk-Nt for submit <at> debbugs.gnu.org; Mon, 23 Apr 2012 09:28:15 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:46209) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <lennart.borgman@HIDDEN>) id 1SMJJI-0007TV-UA for 11218 <at> debbugs.gnu.org; Mon, 23 Apr 2012 09:28:10 -0400 Received: by lbgc1 with SMTP id c1so3854503lbg.3 for <11218 <at> debbugs.gnu.org>; Mon, 23 Apr 2012 06:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=FcsgyRaRqBxwzLkn1LyvtMMjGLZVyU/SUUoLyimmbyg=; b=mhfc/W/XTGvaxgxhBWq2JoKJo/SKeP6/D6NmAzKjhXIdGXNgyOfTjYBft7075cbPr1 wboCLX45iZKN3S9Td1G/v4jny9FB9Z7nWn3LSgf6f6Y/84Y9n0JprDEv+8e6xP3wGpuO Q+9m0qePQZft/HNrEbl+VrdCorWyN90kPGzqQI26GNvccvLuyTjtDXeZy//WaIzB+ppn vlFraKdNnwgtsUL6eoeuaAcZBj5p3hyo3xeDi17E6A5a+BTpXSS35ShRsi/JCNBVc8S+ JpJnGkfKP6vc2ZOjWNwABtOVZbdPaTMFr14DGVtjrBLkrCwk8Jc/LFRJM6iVfqTzrrVg Pa/g== Received: by 10.152.103.239 with SMTP id fz15mr15267830lab.42.1335187641270; Mon, 23 Apr 2012 06:27:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.74.232 with HTTP; Mon, 23 Apr 2012 06:26:51 -0700 (PDT) In-Reply-To: <jwvsjfxstne.fsf-monnier+emacs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> <4F90D369.7070005@HIDDEN> <jwvzka61udx.fsf-monnier+emacs@HIDDEN> <4F91CEEF.20305@HIDDEN> <jwvsjfxstne.fsf-monnier+emacs@HIDDEN> From: Lennart Borgman <lennart.borgman@HIDDEN> Date: Mon, 23 Apr 2012 15:26:51 +0200 Message-ID: <CANbX365dKdVdph9E33dORDgszcx0FsAzr1dez4-bn1_0onQ8YQ@HIDDEN> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.6 (--) On Sat, Apr 21, 2012 at 04:34, Stefan Monnier <monnier@HIDDEN> wr= ote: > > None of these arguments are really specific to ERT. =C2=A0It just seems l= ike > you like to run with debug-on-error, which is fine (I do too). Just a reminder: running with debug-on-error is a pain since some commands raise an error on user input instead of throwing to command level.
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 24 Apr 2012 02:06:02 +0000 Resent-Message-ID: <handler.11218.B11218.133523314014028 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lennart Borgman <lennart.borgman@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Christian Ohler <ohler@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133523314014028 (code B ref 11218); Tue, 24 Apr 2012 02:06:02 +0000 Received: (at 11218) by debbugs.gnu.org; 24 Apr 2012 02:05:40 +0000 Received: from localhost ([127.0.0.1]:49653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SMV8O-0003eC-2q for submit <at> debbugs.gnu.org; Mon, 23 Apr 2012 22:05:40 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:45088) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <monnier@HIDDEN>) id 1SMV8M-0003dy-3a for 11218 <at> debbugs.gnu.org; Mon, 23 Apr 2012 22:05:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUIACxOgk/O+Jnc/2dsb2JhbABDuCMDgQyBCIIJAQEEAVYjEAs0EhQYDSSIHAW2MothhHkEpEWBXYMD X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="176389439" Received: from 206-248-153-220.dsl.teksavvy.com (HELO pastel.home) ([206.248.153.220]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Apr 2012 22:04:47 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9B63458EB0; Mon, 23 Apr 2012 22:04:47 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwv7gx5nawp.fsf-monnier+emacs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> <4F90D369.7070005@HIDDEN> <jwvzka61udx.fsf-monnier+emacs@HIDDEN> <4F91CEEF.20305@HIDDEN> <jwvsjfxstne.fsf-monnier+emacs@HIDDEN> <CANbX365dKdVdph9E33dORDgszcx0FsAzr1dez4-bn1_0onQ8YQ@HIDDEN> Date: Mon, 23 Apr 2012 22:04:47 -0400 In-Reply-To: <CANbX365dKdVdph9E33dORDgszcx0FsAzr1dez4-bn1_0onQ8YQ@HIDDEN> (Lennart Borgman's message of "Mon, 23 Apr 2012 15:26:51 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.9 (-) >> None of these arguments are really specific to ERT. It just seems like >> you like to run with debug-on-error, which is fine (I do too). > Just a reminder: running with debug-on-error is a pain since some > commands raise an error on user input instead of throwing to command > level. YMMV but I've been running with debug-on-error for many years and haven't found it to be a pain. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Christian Ohler <ohler@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 06 May 2012 18:48:02 +0000 Resent-Message-ID: <handler.11218.B11218.133633003627815 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133633003627815 (code B ref 11218); Sun, 06 May 2012 18:48:02 +0000 Received: (at 11218) by debbugs.gnu.org; 6 May 2012 18:47:16 +0000 Received: from localhost ([127.0.0.1]:38810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SR6UG-0007Ea-9t for submit <at> debbugs.gnu.org; Sun, 06 May 2012 14:47:16 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:35822 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <ohler@HIDDEN>) id 1SR6UB-0007EP-CH for 11218 <at> debbugs.gnu.org; Sun, 06 May 2012 14:47:12 -0400 Received: from [72.14.225.65] (port=10675 helo=dhcp-172-16-8-100.lon.corp.google.com) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <ohler@HIDDEN>) id 1SR6SG-0004ZY-EQ; Sun, 06 May 2012 14:45:12 -0400 Message-ID: <4FA6C6B3.7010403@HIDDEN> Date: Sun, 06 May 2012 11:45:07 -0700 From: Christian Ohler <ohler@HIDDEN> MIME-Version: 1.0 References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> <4F90D369.7070005@HIDDEN> <jwvzka61udx.fsf-monnier+emacs@HIDDEN> <4F91CEEF.20305@HIDDEN> <jwvsjfxstne.fsf-monnier+emacs@HIDDEN> In-Reply-To: <jwvsjfxstne.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) Stefan Monnier, 2012-04-20: >>> I don't see the point of showing that info when running the tests. >>> If the user wants that info, he should be able to easily say "run this >>> test with debug-on-error" so he doesn't only get a backtrace but also >>> gets put in the debugger where he can inspect the state. > >> ERT's keyboard shortcut for that is "d". But it's not a good solution if: > >> * the test is nondeterministic (maybe due to subprocess interaction), >> * the test takes a long time to run, >> * you have multiple failing tests and want to quickly compare if they are >> crashing in the same place, >> * ERT is running in batch mode (e.g. make check). > >> It's better to collect as much data as reasonably possible when the error >> first occurs. > > None of these arguments are really specific to ERT. It just seems like > you like to run with debug-on-error, which is fine (I do too). ERT's default behavior is very different from using Emacs with debug-on-error enabled, so in terms of what the user sees, I don't think this analogy works very well. > But don't impose it on all ERT users. This is not a matter of user preference. Collecting additional information about why the test failed is useful to virtually everyone who bothers running the test; there should be no reason not to. (Even if the user doesn't care about the details, it will at least allow them to file a better bug report.) The problem is that the implementation doesn't interact well with `with-demoted-errors'. But that problem is not user- or situation-dependent, so it shouldn't be a setting. >>> No: you'll be put in the debugger for the error "a" but if you hit `c' >>> it will continue and re-enter the debugger for error "b". >> My Emacs is a few months old, but that doesn't work for me. Has it >> changed recently? > [...] >> If `debug-on-error' is t, `with-demoted-errors' becomes essentially >> equivalent to `progn', and (error "b") can ever be reached in > > You're right, sorry: brain malfunction. > But that just means you first have to fix the bug that signals "a" before > getting to the bug that signals "b". If it were that simple, this would be the solution to the OP's problem as well: Just fix the errors that are being demoted. It's a bad solution, though; the user shouldn't have to do this. Enabling the debugger should not change the behavior of the code being debugged. It's a design flaw in `with-demoted-errors' that its behavior depends on the same variable that controls the debugger. The proper solution is to decouple the behaviors, perhaps by splitting the variable, perhaps by some other means. Christian.
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 07 May 2012 01:15:02 +0000 Resent-Message-ID: <handler.11218.B11218.133635325632259 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Ohler <ohler@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133635325632259 (code B ref 11218); Mon, 07 May 2012 01:15:02 +0000 Received: (at 11218) by debbugs.gnu.org; 7 May 2012 01:14:16 +0000 Received: from localhost ([127.0.0.1]:38972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SRCWm-0008OG-Gy for submit <at> debbugs.gnu.org; Sun, 06 May 2012 21:14:16 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:42016) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <monnier@HIDDEN>) id 1SRCWl-0008O2-5L for 11218 <at> debbugs.gnu.org; Sun, 06 May 2012 21:14:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYIACxOgk9FxLCA/2dsb2JhbABDuCMDgQyBCIIJAQEEAVYjBQsLNBIUGA0kLoduBbYyi2GEeQSkRYFdgwM X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="178657775" Received: from 69-196-176-128.dsl.teksavvy.com (HELO pastel.home) ([69.196.176.128]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 May 2012 21:12:10 -0400 Received: by pastel.home (Postfix, from userid 20848) id B22685916D; Sun, 6 May 2012 21:12:10 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvbom0ztnx.fsf-monnier+emacs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> <4F90D369.7070005@HIDDEN> <jwvzka61udx.fsf-monnier+emacs@HIDDEN> <4F91CEEF.20305@HIDDEN> <jwvsjfxstne.fsf-monnier+emacs@HIDDEN> <4FA6C6B3.7010403@HIDDEN> Date: Sun, 06 May 2012 21:12:10 -0400 In-Reply-To: <4FA6C6B3.7010403@HIDDEN> (Christian Ohler's message of "Sun, 06 May 2012 11:45:07 -0700") 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: -1.9 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.9 (-) > Collecting additional information about why the test failed is useful > to virtually everyone who bothers running the test; there should be no > reason not to. I disagree here. I think it's just as well if the "check" and the "debug" are done in 2 different steps. > The proper solution is to decouple the behaviors, perhaps by splitting > the variable, perhaps by some other means. No, the proper solution is to make with-demoted-error (when run with debug-on-error) continue execution (after hitting `c' in the debugger) as if debug-on-error were nil. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Christian Ohler <ohler@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 21 May 2012 03:04:02 +0000 Resent-Message-ID: <handler.11218.B11218.133756943328247 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.133756943328247 (code B ref 11218); Mon, 21 May 2012 03:04:02 +0000 Received: (at 11218) by debbugs.gnu.org; 21 May 2012 03:03:53 +0000 Received: from localhost ([127.0.0.1]:35998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SWIuW-0007LY-Vc for submit <at> debbugs.gnu.org; Sun, 20 May 2012 23:03:53 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:53276 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <ohler@HIDDEN>) id 1SWIuU-0007LR-TK for 11218 <at> debbugs.gnu.org; Sun, 20 May 2012 23:03:51 -0400 Received: from [204.14.153.109] (port=44607 helo=kamel.local) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <ohler@HIDDEN>) id 1SWItt-0005cV-Ob; Sun, 20 May 2012 23:03:13 -0400 Message-ID: <4FB9B071.1060907@HIDDEN> Date: Sun, 20 May 2012 20:03:13 -0700 From: Christian Ohler <ohler@HIDDEN> MIME-Version: 1.0 References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> <jwvsjg07lbp.fsf-monnier+emacs@HIDDEN> <4F90D369.7070005@HIDDEN> <jwvzka61udx.fsf-monnier+emacs@HIDDEN> <4F91CEEF.20305@HIDDEN> <jwvsjfxstne.fsf-monnier+emacs@HIDDEN> <4FA6C6B3.7010403@HIDDEN> <jwvbom0ztnx.fsf-monnier+emacs@HIDDEN> In-Reply-To: <jwvbom0ztnx.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) Stefan Monnier, 2012-05-06: >> Collecting additional information about why the test failed is useful >> to virtually everyone who bothers running the test; there should be no >> reason not to. > > I disagree here. I think it's just as well if the "check" and the > "debug" are done in 2 different steps. ERT originally worked like you describe, until I got tired of having to re-run each failed test just to get a backtrace. The computer has the information in memory at the time the test fails; it should store it somewhere for me to look at later, rather than making me wait while it tries to recompute it. The backtrace is so basic that I practically always want to see it. In batch mode, ERT also has to collect the backtrace on every failure; the idea of re-running with debugging enabled makes no sense in that context (if enabling debugging to collect backtraces in batch mode was an optional flag to be set on a second run after noticing failures on the first run, why not set that flag the first time around?). Also, a continuous build system is much more useful if errors come with more information since that increases the chances that the bug can be fixed without first building a specific version on a specific architecture to reproduce it. >> The proper solution is to decouple the behaviors, perhaps by splitting >> the variable, perhaps by some other means. > > No, the proper solution is to make with-demoted-error (when run with > debug-on-error) continue execution (after hitting `c' in the debugger) > as if debug-on-error were nil. That sounds like a good idea; I would add that it should be possible to invoke this "restart" (in CL terms) programmatically. (This does decouple the behaviors: it allows errors to be demoted regardless of the setting of `debug-on-error'.) Christian.
X-Loop: help-debbugs@HIDDEN Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Resent-From: Noam Postavsky <npostavs@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 15 Aug 2018 01:11:01 +0000 Resent-Message-ID: <handler.11218.B11218.153429541612707 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Ohler <ohler@HIDDEN> Cc: 11218 <at> debbugs.gnu.org, Glenn Morris <rgm@HIDDEN>, Stefan Monnier <monnier@HIDDEN> Received: via spool by 11218-submit <at> debbugs.gnu.org id=B11218.153429541612707 (code B ref 11218); Wed, 15 Aug 2018 01:11:01 +0000 Received: (at 11218) by debbugs.gnu.org; 15 Aug 2018 01:10:16 +0000 Received: from localhost ([127.0.0.1]:51216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1fpkKG-0003Is-It for submit <at> debbugs.gnu.org; Tue, 14 Aug 2018 21:10:16 -0400 Received: from mail-it0-f48.google.com ([209.85.214.48]:51139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <npostavs@HIDDEN>) id 1fpkKE-0003Id-Eg for 11218 <at> debbugs.gnu.org; Tue, 14 Aug 2018 21:10:14 -0400 Received: by mail-it0-f48.google.com with SMTP id j81-v6so21287107ite.0 for <11218 <at> debbugs.gnu.org>; Tue, 14 Aug 2018 18:10:14 -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=U2QbNCs8EFtI/5AoSCcA6Lnatmu2g5w+LPCMgj6p6kU=; b=k3SyfN+DCAeuKVEUbEiBpmfW/hM7o4obD7NevMDMPcAU6RRrcVZmhC4+j+HKcy47gf Gar9swF4mYZJ3QH0mpHwj38kyvi8KyvBYh+uROyVFdH5WkZr3CdEIdY59FNbmqFrd3+z IDGn1kiltbT8u8m2jEF3e07f/0D47MaX31PHy6vWjMqESLIlbDMDP17i32YnwrD1jduC OO1Mmz6dXEOFSJ04doX2pXLrN8FeX2VbduYtqEm4HQD9WRw9ZVfcCFHgAMM8G+KAuH9T +wkzn0UDsxfa+TlVXO1I359EXbHPzirR3RLuz4F+C0dV4G7GeEkEwCWle8uIiptPmIj2 rJsA== 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=U2QbNCs8EFtI/5AoSCcA6Lnatmu2g5w+LPCMgj6p6kU=; b=LLoAc5bM0/QWPHuDenAYe5gqgE9+LikHEB3f6gi92hKqHsl1mPe7hElf03/CFeQUzt jPnDYI+tLvYFER2IRxCOD1aTzW+LlCO5zxdIOS6gpS+5R71gNEpEjqoTD7cn6lTIxBNC LQ/bqf6uaCuguoj3OXaRMCPitxhNUc5VJbq75xmLcv0cCksGtATZrNHSqKp6SWRFimN/ onr/KDVc85xGQ5jbLhW+yxx8bgTgyZksO5wAikYEy6Ezj17FYcNGVwhcQY5IGNagvFUh NP5tWvBDIFJ3yUiffFpWuqGepZoq2RkY3zC2tstqjz8yJuvPd/2h3iAuRSW+/PZPRaKZ K5Gw== X-Gm-Message-State: AOUpUlFZM+I8ESB2rdz5wRx3dSoOcVp6IaEsGmUglkVVF02CQz0XNjpw lxCDGnvkCCkbzmLozpw2tf0= X-Google-Smtp-Source: AA+uWPz1my5f5q2HergMitfA/9/fI4Jl+crKxd8z2QBnlPM63wizW6LtJYQZUGjctykbwF0XehVHGQ== X-Received: by 2002:a02:5cd3:: with SMTP id w80-v6mr21386098jad.85.1534295408837; Tue, 14 Aug 2018 18:10:08 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id z195-v6sm19319646ioe.38.2018.08.14.18.10.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Aug 2018 18:10:08 -0700 (PDT) From: Noam Postavsky <npostavs@HIDDEN> References: <qeobqzc528.fsf@HIDDEN> <jwvfwcabf0k.fsf-monnier+emacs@HIDDEN> <jity0oo5ad.fsf@HIDDEN> <jwvfwc74upn.fsf-monnier+emacs@HIDDEN> <4F8DE112.5010106@HIDDEN> Date: Tue, 14 Aug 2018 21:10:07 -0400 In-Reply-To: <4F8DE112.5010106@HIDDEN> (Christian Ohler's message of "Tue, 17 Apr 2012 14:30:58 -0700") Message-ID: <87in4cxwnk.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Christian Ohler <ohler@HIDDEN> writes: > On 4/13/12 6:44 AM, Stefan Monnier wrote: >>>>> If you replace with-demoted-errors with ignore-errors, the test passes. >>>> Looks like a bug in ERT. >>> I don't know if it's a "bug" per se... >>> ert--run-test-internal binds debug-on-error to t, and redefines the >>> debugger to ert--run-test-debugger. As the doc of that function says: >> >> I wonder why ERT doesn't just use condition-case to catch and record >> the errors. > > Two reasons that I remember off the top of my head: Recording > backtraces, and recording additional information provided with > `ert-info'. Using condition-case would let ERT regain control only > after the stack is unwound, at which point that information is gone. I just posted a patch which changes ERT to use `signal-hook-function' to record backtraces instead. It fixes the case in the OP. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30745#20 Note that condition-case also needs an enhancement to be able to catch any signal (Bug#24618), so that might be a third reason why ERT didn't go this route originally.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.