unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3310: condition-case-no-debug
@ 2009-05-16 18:41 Johan =?UTF-8?Q?Bockg=C3=A5rd
  2009-05-17  4:15 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Johan =?UTF-8?Q?Bockg=C3=A5rd @ 2009-05-16 18:41 UTC (permalink / raw)
  To: bug-gnu-emacs


condition-case-no-debug is not documented, either in the manual or in
NEWS. Also, there's another feature that does the same thing, except
better (if uglier):

    (condition-case nil (foo bar) ((debug error) nil))

This handles errors but gives the debugger a chance to run first.
condition-case-no-debug OTOH either handles errors, or lets the debugger
run but does not handle errors, depending on the value of debug-on-error.

If condition-case-no-debug should be kept, at least make it expand into
the above construct (and document it).








^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3310: condition-case-no-debug
  2009-05-16 18:41 bug#3310: condition-case-no-debug Johan =?UTF-8?Q?Bockg=C3=A5rd
@ 2009-05-17  4:15 ` Stefan Monnier
  2009-05-17 17:22   ` Richard M Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2009-05-17  4:15 UTC (permalink / raw)
  To: bug-gnu-emacs

>     (condition-case nil (foo bar) ((debug error) nil))
> This handles errors but gives the debugger a chance to run first.

Yes, I hate this feature.

> If condition-case-no-debug should be kept, at least make it expand into
> the above construct (and document it).

So, clearly I don't want condition-case-no-debug to expand into it.


        Stefan










^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3310: condition-case-no-debug
  2009-05-17  4:15 ` Stefan Monnier
@ 2009-05-17 17:22   ` Richard M Stallman
  2009-05-17 19:24     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Richard M Stallman @ 2009-05-17 17:22 UTC (permalink / raw)
  To: Stefan Monnier, 3310; +Cc: bug-gnu-emacs

    >     (condition-case nil (foo bar) ((debug error) nil))
    > This handles errors but gives the debugger a chance to run first.

    Yes, I hate this feature.

You don't have to use it, so why does its existence bother you?

I agree that condition-case-no-debug seems redundant.
The other feature is more flexible and more elegant.







^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3310: condition-case-no-debug
  2009-05-17 17:22   ` Richard M Stallman
@ 2009-05-17 19:24     ` Stefan Monnier
  2009-05-18 16:44       ` Richard M Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2009-05-17 19:24 UTC (permalink / raw)
  To: rms; +Cc: 3310

>> (condition-case nil (foo bar) ((debug error) nil))
>> This handles errors but gives the debugger a chance to run first.
>     Yes, I hate this feature.
> You don't have to use it, so why does its existence bother you?

Exactly because I have to pay for it even if I never use it.


        Stefan






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3310: condition-case-no-debug
  2009-05-17 19:24     ` Stefan Monnier
@ 2009-05-18 16:44       ` Richard M Stallman
  2009-05-18 20:14         ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Richard M Stallman @ 2009-05-18 16:44 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 3310

    >> (condition-case nil (foo bar) ((debug error) nil))
    >> This handles errors but gives the debugger a chance to run first.
    >     Yes, I hate this feature.
    > You don't have to use it, so why does its existence bother you?

    Exactly because I have to pay for it even if I never use it.

I do not follow you.  I don't think this will bother you at all
if you don't use it.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3310: condition-case-no-debug
  2009-05-18 16:44       ` Richard M Stallman
@ 2009-05-18 20:14         ` Stefan Monnier
  2009-05-22  4:36           ` Richard M Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2009-05-18 20:14 UTC (permalink / raw)
  To: rms; +Cc: 3310

>>> (condition-case nil (foo bar) ((debug error) nil))
>>> This handles errors but gives the debugger a chance to run first.
>> Yes, I hate this feature.
>> You don't have to use it, so why does its existence bother you?

>     Exactly because I have to pay for it even if I never use it.

> I do not follow you.  I don't think this will bother you at all
> if you don't use it.

AFAICT its implementation has a cost even for those condition-case which
don't use the `debug' feature.


        Stefan






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3310: condition-case-no-debug
  2009-05-18 20:14         ` Stefan Monnier
@ 2009-05-22  4:36           ` Richard M Stallman
       [not found]             ` <jwvtz3drma0.fsf-monnier+emacsbugreports@gnu.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Richard M Stallman @ 2009-05-22  4:36 UTC (permalink / raw)
  To: Stefan Monnier, 3310; +Cc: 3310

    > I do not follow you.  I don't think this will bother you at all
    > if you don't use it.

    AFAICT its implementation has a cost even for those condition-case which
    don't use the `debug' feature.

Every feature has some cost, but I don't see why the cost of this feature
is enough to be worth worrying about.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3310: condition-case-no-debug
       [not found]             ` <jwvtz3drma0.fsf-monnier+emacsbugreports@gnu.org>
@ 2011-07-11 15:24               ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-11 15:24 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 3310, rms

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> Because condition-case-no-debug shows a simpler way to solve the same
> problem without any cost when the feature is not used (and also without
> touching any C code).
> We've been through this dicsussion.  All I wanted to say is to explain
> why we're in this situation.  I have no intention to get into the
> discussion again since we already agreed to disagree.

The function has a good doc string, so I think this bug report can be
closed.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-11 15:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-16 18:41 bug#3310: condition-case-no-debug Johan =?UTF-8?Q?Bockg=C3=A5rd
2009-05-17  4:15 ` Stefan Monnier
2009-05-17 17:22   ` Richard M Stallman
2009-05-17 19:24     ` Stefan Monnier
2009-05-18 16:44       ` Richard M Stallman
2009-05-18 20:14         ` Stefan Monnier
2009-05-22  4:36           ` Richard M Stallman
     [not found]             ` <jwvtz3drma0.fsf-monnier+emacsbugreports@gnu.org>
2011-07-11 15:24               ` Lars Magne Ingebrigtsen

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).