all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Markus Triska <markus.triska@gmx.at>
Cc: 683@emacsbugs.donarmstrong.com
Subject: bug#683: 23.0.60; Recursive load error stays
Date: Wed, 25 Feb 2009 13:07:14 +0100	[thread overview]
Message-ID: <f7ccd24b0902250407h7f1839bgb96a19f8f7bbfe85@mail.gmail.com> (raw)
In-Reply-To: <m1abf0v1bd.fsf@mt-computer.vdn.ca>

On Tue, Aug 26, 2008 at 05:37, Markus Triska <markus.triska@gmx.at> wrote:

> Yes - it works as I expect when I quit the debugger with "q", but not
> within the recursive edit (i.e., if I leave the *Backtrace* buffer open
> and do not exit the debugger). Other forms seem to evaluate as usual
> also in the recursive editing level, whereas "load" seems different.

For starters, using C-x C-e inside a comment is a bit weird; it
"works", for single-line expressions, but it uses forward-sexp, whose
docstring says: "This command assumes point is not in a string or
comment."

That aside, what happens is this: `load' uses a static variable
Vloads_in_progress to detect recursive loads. On the normal (not
backtrace) case, *before reading the file*, it checks the name of the
file against Vloads_in_progress, finds nothing unusual, so it loads
the file (by calling the Vload_source_file_function).

In the backtrace case, when trying to load ~/p.el again, load is still
on the call stack, so Vloads_in_progress has not been reset to nil; as
expected, `load' finds p.el in Vloads_in_progress, and bails out. It
is irrelevant whether you commented out the line and saved the file,
because it is not being read yet at that point. If you try to load
another file instead you'll see it loads OK, because it is not in
Vloads_in_progress.

It is not a bug: calling a function when it is in the call stack will
be affected by global variables and other non-reentrant code used in
that function.

    Juanma






      reply	other threads:[~2009-02-25 12:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-09 22:12 bug#683: 23.0.60; Recursive load error stays Markus Triska
2008-08-09 23:14 ` OFFICE ZERO
2008-08-23  0:56 ` Glenn Morris
2008-08-26  4:37   ` Markus Triska
2009-02-25 12:07     ` Juanma Barranquero [this message]

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=f7ccd24b0902250407h7f1839bgb96a19f8f7bbfe85@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=683@emacsbugs.donarmstrong.com \
    --cc=markus.triska@gmx.at \
    /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.