* bug#9329: 24.0.50; `condition-case' with (debug...) is broken
@ 2011-08-19 3:47 Drew Adams
2011-08-19 12:32 ` Lars Magne Ingebrigtsen
2011-08-20 21:17 ` Chong Yidong
0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2011-08-19 3:47 UTC (permalink / raw)
To: 9329
(let ((debug-on-error t)
(eval-expression-debug-on-error t))
(condition-case nil (/ 1 0)
((debug error) "Test")))
The debugger is not opened. In Emacs 23.3 it is opened (as the doc says
it should be).
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2011-08-15 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#9329: 24.0.50; `condition-case' with (debug...) is broken
2011-08-19 3:47 bug#9329: 24.0.50; `condition-case' with (debug...) is broken Drew Adams
@ 2011-08-19 12:32 ` Lars Magne Ingebrigtsen
2011-08-19 13:18 ` Drew Adams
2011-08-20 21:17 ` Chong Yidong
1 sibling, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-08-19 12:32 UTC (permalink / raw)
To: Drew Adams; +Cc: 9329
"Drew Adams" <drew.adams@oracle.com> writes:
> (let ((debug-on-error t)
> (eval-expression-debug-on-error t))
> (condition-case nil (/ 1 0)
> ((debug error) "Test")))
>
> The debugger is not opened. In Emacs 23.3 it is opened (as the doc says
> it should be).
---
The car of a handler may be a list of condition names
instead of a single condition name. Then it handles all of them.
---
So it seems to be doing what it's supposed to be doing.
Is this what you wanted to say instead?
(condition-case error
(/ 1 0)
(error
(debug error)
"Test"))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#9329: 24.0.50; `condition-case' with (debug...) is broken
2011-08-19 12:32 ` Lars Magne Ingebrigtsen
@ 2011-08-19 13:18 ` Drew Adams
0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2011-08-19 13:18 UTC (permalink / raw)
To: 'Lars Magne Ingebrigtsen'; +Cc: 9329
> > (let ((debug-on-error t)
> > (eval-expression-debug-on-error t))
> > (condition-case nil (/ 1 0)
> > ((debug error) "Test")))
> >
> > The debugger is not opened. In Emacs 23.3 it is opened (as
> > the doc says it should be).
>
> The car of a handler may be a list of condition names
> instead of a single condition name. Then it handles all of them.
Yes. So? (debug error) is a list of condition names. It is the car of a handler
(the only handler).
> So it seems to be doing what it's supposed to be doing.
No. Check the doc. Check Emacs 23 - e.g., 23.3.1.
> Is this what you wanted to say instead?
> (condition-case error
> (/ 1 0)
> (error (debug error) "Test"))
No.
C-h i, Elisp, g handling errors
"If an error is handled by some `condition-case' form, this
ordinarily prevents the debugger from being run, even if
`debug-on-error' says this error should invoke the debugger.
If you want to be able to debug errors that are caught by a
`condition-case', set the variable `debug-on-signal' to a non-`nil'
value. You can also specify that a particular handler should let the
debugger run first, by writing `debug' among the conditions, like this:
(condition-case nil
(delete-file filename)
((debug error) nil))
"
Put the cursor after that sexp. `C-x C-e'. Do the same thing in Emacs 23.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#9329: 24.0.50; `condition-case' with (debug...) is broken
2011-08-19 3:47 bug#9329: 24.0.50; `condition-case' with (debug...) is broken Drew Adams
2011-08-19 12:32 ` Lars Magne Ingebrigtsen
@ 2011-08-20 21:17 ` Chong Yidong
2011-08-21 3:50 ` Stefan Monnier
1 sibling, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2011-08-20 21:17 UTC (permalink / raw)
To: Drew Adams; +Cc: 9329
"Drew Adams" <drew.adams@oracle.com> writes:
> (let ((debug-on-error t)
> (eval-expression-debug-on-error t))
> (condition-case nil (/ 1 0)
> ((debug error) "Test")))
>
> The debugger is not opened. In Emacs 23.3 it is opened (as the doc says
> it should be).
Thanks. This regression was due to the 2011-01-26 change to eval.c on
the trunk (r102982). I've committed a fix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#9329: 24.0.50; `condition-case' with (debug...) is broken
2011-08-20 21:17 ` Chong Yidong
@ 2011-08-21 3:50 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2011-08-21 3:50 UTC (permalink / raw)
To: Chong Yidong; +Cc: 9329
>> (let ((debug-on-error t)
>> (eval-expression-debug-on-error t))
>> (condition-case nil (/ 1 0)
>> ((debug error) "Test")))
>> The debugger is not opened. In Emacs 23.3 it is opened (as the doc says
>> it should be).
> Thanks. This regression was due to the 2011-01-26 change to eval.c on
> the trunk (r102982).
Indeed I hate this "feature" and didn't bother to reimplement it.
> I've committed a fix.
Oh well,
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-08-21 3:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-19 3:47 bug#9329: 24.0.50; `condition-case' with (debug...) is broken Drew Adams
2011-08-19 12:32 ` Lars Magne Ingebrigtsen
2011-08-19 13:18 ` Drew Adams
2011-08-20 21:17 ` Chong Yidong
2011-08-21 3:50 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).