* Shouldn't edebug-eval-last-sexp work too outside of edebug?
@ 2022-02-27 16:12 emacsq via Users list for the GNU Emacs text editor
2022-02-27 23:01 ` Michael Heerdegen
0 siblings, 1 reply; 2+ messages in thread
From: emacsq via Users list for the GNU Emacs text editor @ 2022-02-27 16:12 UTC (permalink / raw)
To: emacsq via Users list for the GNU Emacs text editor
From time to time I use edebug-eval-top-level-form to run forms through edebug and it's quite useful.
Sometimes when cursor is after the expression, I invoke edebug-eval-last-sexp, but that fails to work outside of edebug.
Shouldn't the latter work too like edebug-eval-top-level-form does if it's invoked outside of edebug?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Shouldn't edebug-eval-last-sexp work too outside of edebug?
2022-02-27 16:12 Shouldn't edebug-eval-last-sexp work too outside of edebug? emacsq via Users list for the GNU Emacs text editor
@ 2022-02-27 23:01 ` Michael Heerdegen
0 siblings, 0 replies; 2+ messages in thread
From: Michael Heerdegen @ 2022-02-27 23:01 UTC (permalink / raw)
To: help-gnu-emacs
emacsq via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> From time to time I use edebug-eval-top-level-form to run forms
> through edebug and it's quite useful.
>
> Sometimes when cursor is after the expression, I invoke
> edebug-eval-last-sexp, but that fails to work outside of edebug.
>
> Shouldn't the latter work too like edebug-eval-top-level-form does if
> it's invoked outside of edebug?
The commands are of quite different nature I think.
`edebug-eval-top-level-form' instruments and evals a form _in_ Edebug,
while `edebug-eval-top-level-form' evals a form from inside edebug, in
the _outer_ (i.e. debugged) context - without Edebug stepping.
Or with other words: edebug-eval-top-level-form is for instrumenting and
starting edebug. `edebug-eval-top-level-form' exists only for the
purpose that C-x C-e behaves as expected - you don't want it to evaluate
stuff in the inside context, the edebug session, where lexical bindings
would not be visible etc. That would not be very useful (unless for
debugging Edebug maybe).
Try to use them and you'll see how that makes sense.
Michael.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-27 23:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-27 16:12 Shouldn't edebug-eval-last-sexp work too outside of edebug? emacsq via Users list for the GNU Emacs text editor
2022-02-27 23:01 ` Michael Heerdegen
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.