all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#683: 23.0.60; Recursive load error stays
@ 2008-08-09 22:12 Markus Triska
  2008-08-09 23:14 ` OFFICE ZERO
  2008-08-23  0:56 ` Glenn Morris
  0 siblings, 2 replies; 5+ messages in thread
From: Markus Triska @ 2008-08-09 22:12 UTC (permalink / raw)
  To: emacs-pretest-bug


I have "~/p.el" which consists of the form:

   (load "~/p.el")

When I do:

   emacs -Q ~/p.el

and evaluate the form (C-x C-e), I get:

   Debugger entered--Lisp error: (error "Recursive load"...

as expected. Now I comment out the form:

   ;(load "~/p.el")

then save the file, and evaluate the form again. Now I again get:

   Debugger entered--Lisp error: (error "Recursive load"...

When I restart Emacs, it correctly evaluates the form.


In GNU Emacs 23.0.60.1 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)
 of 2008-08-08 on pnsgw1-client079.demo.tuwien.ac.at
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#683: 23.0.60; Recursive load error stays
  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
  1 sibling, 0 replies; 5+ messages in thread
From: OFFICE ZERO @ 2008-08-09 23:14 UTC (permalink / raw)
  To: Markus Triska, 683

Do'nt   send  me mail  !!!
no tkank you!!


----- Original Message ----- 
From: "Markus Triska" <markus.triska@gmx.at>
To: <emacs-pretest-bug@gnu.org>
Sent: Sunday, August 10, 2008 7:12 AM
Subject: bug#683: 23.0.60; Recursive load error stays


>
> I have "~/p.el" which consists of the form:
>
>   (load "~/p.el")
>
> When I do:
>
>   emacs -Q ~/p.el
>
> and evaluate the form (C-x C-e), I get:
>
>   Debugger entered--Lisp error: (error "Recursive load"...
>
> as expected. Now I comment out the form:
>
>   ;(load "~/p.el")
>
> then save the file, and evaluate the form again. Now I again get:
>
>   Debugger entered--Lisp error: (error "Recursive load"...
>
> When I restart Emacs, it correctly evaluates the form.
>
>
> In GNU Emacs 23.0.60.1 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)
> of 2008-08-08 on pnsgw1-client079.demo.tuwien.ac.at
> Windowing system distributor `The XFree86 Project, Inc', version 
> 11.0.40400000
> Important settings:
>  value of $LC_ALL: nil
>  value of $LC_COLLATE: nil
>  value of $LC_CTYPE: nil
>  value of $LC_MESSAGES: nil
>  value of $LC_MONETARY: nil
>  value of $LC_NUMERIC: nil
>  value of $LC_TIME: nil
>  value of $LANG: en.UTF-8
>  value of $XMODIFIERS: nil
>  locale-coding-system: nil
>  default-enable-multibyte-characters: t
>
>
>
>
> 







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#683: 23.0.60; Recursive load error stays
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2008-08-23  0:56 UTC (permalink / raw)
  To: Markus Triska; +Cc: 683

Markus Triska wrote:

> I have "~/p.el" which consists of the form:
>
>    (load "~/p.el")
>
> When I do:
>
>    emacs -Q ~/p.el
>
> and evaluate the form (C-x C-e), I get:
>
>    Debugger entered--Lisp error: (error "Recursive load"...
>
> as expected. Now I comment out the form:
>
>    ;(load "~/p.el")
>
> then save the file, and evaluate the form again. Now I again get:
>
>    Debugger entered--Lisp error: (error "Recursive load"...
>
> When I restart Emacs, it correctly evaluates the form.
>
>
> In GNU Emacs 23.0.60.1 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)


Do you still see this? It doesn't happen for me with the current CVS
on GNU/Linux.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#683: 23.0.60; Recursive load error stays
  2008-08-23  0:56 ` Glenn Morris
@ 2008-08-26  4:37   ` Markus Triska
  2009-02-25 12:07     ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Triska @ 2008-08-26  4:37 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 683

Glenn Morris <rgm@gnu.org> writes:

> Do you still see this?

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.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#683: 23.0.60; Recursive load error stays
  2008-08-26  4:37   ` Markus Triska
@ 2009-02-25 12:07     ` Juanma Barranquero
  0 siblings, 0 replies; 5+ messages in thread
From: Juanma Barranquero @ 2009-02-25 12:07 UTC (permalink / raw)
  To: Markus Triska; +Cc: 683

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






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-25 12:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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.