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: 15101@debbugs.gnu.org
Subject: bug#15101: 24.3.50; debugger-eval-expression broken
Date: Thu, 15 Aug 2013 10:45:52 -0400	[thread overview]
Message-ID: <jwvsiybf23y.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m24narw5bo.fsf@gmail.com> (Helmut Eller's message of "Thu, 15 Aug 2013 13:39:55 +0200")

> Start Emacs with: emacs -Q --eval '(let ((foo 123)) (debug))'
> Then press e. Enter foo to evaluate the local variable foo. But it
> doesn't work; it only generates the error:
> debugger-eval-expression: Symbol's value as variable is void: foo
> This used to work fine in previous versions.

Indeed, this is a change that will trip up users.  Here's what's
happening: `e' will now run the code in the context in which the "code
on the current line" was run.

This refinement can be useful for dynamically bound variables, but was
mostly added for lexically bound variables, where it's indispensable.

So the above recipe works again if you use C-p before `e' so that point
is now on the top-most line, which stands for "in the context that
called `debug'".

I think a good fix is to change debug.el so that point starts on the
first line of the *Debugger* buffer rather than on the second.


        Stefan





  reply	other threads:[~2013-08-15 14:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 11:39 bug#15101: 24.3.50; debugger-eval-expression broken Helmut Eller
2013-08-15 14:45 ` Stefan Monnier [this message]
2013-08-15 15:06   ` Drew Adams
2013-08-15 16:37     ` Stefan Monnier
2013-08-15 17:03       ` Drew Adams
2013-08-15 17:16   ` Helmut Eller
2013-08-15 20:30     ` Stefan Monnier
2013-08-16  5:27       ` Helmut Eller
2013-08-16 16:14         ` Stefan Monnier
2013-08-16 17:03           ` Helmut Eller
2013-08-15 17:21   ` Stefan Monnier
2013-08-15 17:47     ` Drew Adams
2013-08-15 20:27       ` Stefan Monnier
2013-08-15 21:12         ` Drew Adams

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=jwvsiybf23y.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=15101@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.