all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: 9463@debbugs.gnu.org
Subject: bug#9463: 24.0.50; Errors should not be continuable
Date: Fri, 09 Sep 2011 17:44:22 -0400	[thread overview]
Message-ID: <jwvaaadh04u.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m2litxbriz.fsf@gmail.com> (Helmut Eller's message of "Fri, 09 Sep 2011 18:37:56 +0200")

> > There's nothing DWIMish at all about it.
> That's in the eye beholder.

Not at all: the code is proof that there is nothing DWIMish about it.
I know DWIM when I see it, and I assure you there's no such thing here.

> Let's assume we are hunting down some annoying bug.  The debugger just
> popped up and we execute the sequence: d c d c c c c.  The last 4 c are
> needed for a loop that has a call to debug.  Now we are at a moderately
> interesting place, lets continue: d c.  The last c hits an error but we
> are in a hurry and don't see it.  Pressing c again suddenly brings us
> back to top-level.  Duh!  The stack is gone.

But the same happens in many other circumstances where no error shows
up: the loop goes around N times, and you hit "c" just one extra time
and poof the loop ends, returns to the caller who deletes the temp
buffer and your network data is gone.

I understand you liked the old behavior because it ended up providing
a heuristic way to prevent you from stepping too far, and in your
experience this worked well.

>> All in all, I think what you're asking is for the debugger to be
>> informed of the situation in which it is invoked (e.g. because of
>> a signal, or because of an explicit call, when entering a function, when
>> exiting a function, ...) so that commands like `r' can tell whether
>> they'll be useful and so that we can provide a new command "continue
>> only if this was not a signal" that would behave somewhat like the old
>> "continue" (tho more cleanly since it would burp right away instead of
>> doing the previous dance of first continuing, then having the C-level
>> code figure out that you're trying to continue after a signal and hence
>> re-enter the debugger with a new error).
> Specifically, I'm saying that c should not unwind the stack after
> errors.

I understand that's what you want.  The fixes I installed in the C side
were done to make it possible for "c" to continue after an error, which
is a very useful behavior in several cases.  So I'm definitely not going
to revert this change.

What I can offer is to provide more flexibility so you could for
instance rebind "c" to some command that simulates the behavior you used
to get with "c".  We could also consider changing "c" so it asks for
confirmation before continuing from an error.

But for any of that, we first have to change the code so that "c" can
know whether we were called because of an error or not: currently "c"
doesn't known that (and it didn't know that either in earlier Emacsen).


        Stefan





  reply	other threads:[~2011-09-09 21:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 12:01 bug#9463: 24.0.50; Errors should not be continuable Helmut Eller
2011-09-08 13:31 ` Stefan Monnier
2011-09-08 18:13   ` Helmut Eller
2011-09-09  2:23     ` Stefan Monnier
2011-09-09  6:53       ` Helmut Eller
2011-09-09 14:07         ` Stefan Monnier
2011-09-09 16:37           ` Helmut Eller
2011-09-09 21:44             ` Stefan Monnier [this message]
2011-09-10 18:27               ` Helmut Eller
2011-09-19 21:17                 ` Stefan Monnier
2011-09-20  6:49                   ` Helmut Eller
2011-09-20 21:53                     ` Stefan Monnier
2011-09-21  8:05                       ` Helmut Eller
2011-09-21 19:09                         ` Stefan Monnier
2011-09-21 19:53                           ` Helmut Eller
2012-02-22  2:20                             ` Glenn Morris
2011-09-09  7:10       ` Eli Zaretskii
2011-09-09  7:36         ` Helmut Eller
2011-09-09  7:59           ` Eli Zaretskii
2011-09-09  8:22             ` Helmut Eller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvaaadh04u.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=9463@debbugs.gnu.org \
    --cc=eller.helmut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.