all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jarosław Rzeszótko" <jrzeszotko@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: Making debugging possible on expressions executed from ielm
Date: Tue, 16 Jan 2018 07:42:57 +0100	[thread overview]
Message-ID: <CAO_X8WAoZKgcOvuaLpw_W70Kzup5Uts9tsCr_iNJPkdXN5v_YQ@mail.gmail.com> (raw)
In-Reply-To: <jwvy3kyiy4o.fsf-monnier+gmane.emacs.devel@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2288 bytes --]

On Mon, Jan 15, 2018 at 10:59 PM, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> > I did not know about condition-case-unless-debug, it indeed does make
> > debugging possible with a simpler change and without any side effects.
> > I attach the patch.
>
> Have you verified that IELM stays usable after such an error?
>

In the tests I was able to invent, yes. If you press c from the debugger to
continue execution the IELM error message and a new prompt appear as
usually, and evaluating new expressions in IELM still works fine. I was
mostly interested in seeing the stack trace in the debugger, and I am not a
power user of the Emacs debugger, but I did also try evaluating some
expressions from the debugger, stepping through etc., it all seemed to work
fine. You do see all the ielm internal functions in the stack trace, with
the stack trace of your expression on top. This is no different from e.g.
evaluating an expression with M-: though, where you also enter the debugger
in the context of some Emacs internals.

I tried to find some trace in the version control history of why the
limitation of not respecting debug-on-error could possibly be there, I did
not find anything though. The comment about not respecting debug-on-error
and debug-on-quit is in ielm.el from 1994:

https://github.com/emacs-mirror/emacs/commit/813f532d2f0d18dcda7d93be2c6cd841815ff8b8#diff-63abff285057c34e375ed9bb9f2f0199R302


> Are all 3 hunks necessary?
>

The middle one is the most important as it covers evaluation of the form
that was read in. However in the other two cases, of an read error and a
pretty printing error, IELM also will show an error before emitting next
prompt, and I think you plausibly could be willing to debug the error, or
at least examine the stack trace.

I was giving some thought to having ielm-debug-on-error and
ielm-debug-on-quit variables, initializing them to debug-on-error and
debug-on-quit default values, and having the ielm-* versions take
precedence, so that you can customize ielm to behave differently than the
rest of Emacs. Personally though I think it only would make sense if there
were some pitfalls or quirks in debugging from IELM, and right now I don't
see any.

Cheers,
Jarosław Rzeszótko

[-- Attachment #2: Type: text/html, Size: 3057 bytes --]

  reply	other threads:[~2018-01-16  6:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-13  9:22 Making debugging possible on expressions executed from ielm Jarosław Rzeszótko
2018-01-15 17:23 ` Stefan Monnier
2018-01-15 19:22 ` Jarosław Rzeszótko
2018-01-15 21:59   ` Stefan Monnier
2018-01-16  6:42     ` Jarosław Rzeszótko [this message]
2018-01-19 19:14   ` Jarosław Rzeszótko
2018-01-19 19:58     ` Eli Zaretskii
2018-01-20 17:55   ` Stefan Monnier

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=CAO_X8WAoZKgcOvuaLpw_W70Kzup5Uts9tsCr_iNJPkdXN5v_YQ@mail.gmail.com \
    --to=jrzeszotko@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.