all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit--Claudel" <clement.pit@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: How can I rethrow an error after recording a backtrace?
Date: Fri, 05 Aug 2016 09:12:27 +0300	[thread overview]
Message-ID: <83mvkrlp6c.fsf@gnu.org> (raw)
In-Reply-To: <bc8beba2-6671-75f4-936e-a2522e8ffdff@gmail.com> (message from Clément Pit--Claudel on Thu, 4 Aug 2016 22:34:23 -0400)

> From: Clément Pit--Claudel <clement.pit@gmail.com>
> Date: Thu, 4 Aug 2016 22:34:23 -0400
> 
> * I should really have asked "how can I capture multiple errors on Emacs server?". It turns out that the rethrowing is pretty irrelevant, as it just seems that the number of non-macro input events stays 0 on a --daemon server.

Only when invoking emacsclient to perform commands non-interactively,
right?  If you start an interactive session using emacsclient, the
debugger behaves as expected, right?

If so, the bug is that the daemon thinks it is in a situation
described by the comment you quote, while "emacs -batch" somehow
avoids that pitfall.  You should debug Emacs to understand why the
difference happens.

> * In light of this, is this comment actually true?
> 
>   /* The value of num_nonmacro_input_events as of the last time we
>      started to enter the debugger.  If we decide to enter the debugger
>      again when this is still equal to num_nonmacro_input_events, then we
>      know that the debugger itself has an error, and we should just
>      signal the error instead of entering an infinite loop of debugger
>      invocations.  */
> 
>   What if num_nonmacro_input_events just didn't increase because there were no such events? And thus, is the behavior that I'm seeing a bug?

Then how come "emacs -batch" doesn't exhibit the same behavior?

> Or is it just a weird aspect of running code on a --daemon server, and I should submit a documentation patch suggesting to `(cl-incf num-nonmacro-input-events)'?

No, I don't think so.



  reply	other threads:[~2016-08-05  6:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  2:12 How can I rethrow an error after recording a backtrace? Clément Pit--Claudel
2016-08-05  2:23 ` Stefan Monnier
2016-08-05  9:40   ` Clément Pit--Claudel
2016-08-06  2:11     ` Stefan Monnier
2016-08-06 10:03       ` Eli Zaretskii
2016-08-06 13:29         ` Stefan Monnier
2016-08-05  2:34 ` Clément Pit--Claudel
2016-08-05  6:12   ` Eli Zaretskii [this message]
     [not found]     ` <73dc7988-7b41-385d-1083-6a6fa4bfbd91@gmail.com>
2016-08-05 13:40       ` Eli Zaretskii
2016-08-05 15:38         ` Clément Pit--Claudel
2016-08-06 10:02           ` Eli Zaretskii
2016-08-06 15:24             ` Clément Pit--Claudel
2016-08-06 15:31               ` Eli Zaretskii
2016-08-06 15:49                 ` Clément Pit--Claudel
2016-08-06 17:38                   ` Eli Zaretskii

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=83mvkrlp6c.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=clement.pit@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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.