emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] help debugging org-babel-execute-buffer
@ 2010-07-27  3:14 Austin Frank
  2010-07-27  4:41 ` Nick Dokos
  2010-08-19  5:33 ` Nick Dokos
  0 siblings, 2 replies; 6+ messages in thread
From: Austin Frank @ 2010-07-27  3:14 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 968 bytes --]

Hello!

I have a document that always throws an error when I call
org-babel-execute-buffer.  I'd guess that there's one particular block
that is to blame, but I can't tell which block babel is in at the point
when the error is thrown.

The error is:

#v+
Debugger entered--Lisp error: (invalid-function org-save-outline-visibility)
  org-save-outline-visibility(t 1 nil nil)
  org-babel-execute-buffer(nil)
  call-interactively(org-babel-execute-buffer nil nil)
#v-

Looking at the macro for org-save-outline-visibility, I think the
problem has to do with the last two arguments being passed in as nil
nil.  I don't, however, know how this is happening.

I know that I probably haven't given enough information to actually
diagnose this bug.  Can anyone give me a hand on what my next debugging
step should be for this problem?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [babel] help debugging org-babel-execute-buffer
  2010-07-27  3:14 [babel] help debugging org-babel-execute-buffer Austin Frank
@ 2010-07-27  4:41 ` Nick Dokos
  2010-07-27  6:33   ` Austin Frank
  2010-08-19  5:33 ` Nick Dokos
  1 sibling, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2010-07-27  4:41 UTC (permalink / raw)
  To: Austin Frank; +Cc: nicholas.dokos, emacs-orgmode

Austin Frank <austin.frank@gmail.com> wrote:

> I have a document that always throws an error when I call
> org-babel-execute-buffer.  I'd guess that there's one particular block
> that is to blame, but I can't tell which block babel is in at the point
> when the error is thrown.
> 
> The error is:
> 
> #v+
> Debugger entered--Lisp error: (invalid-function org-save-outline-visibility)
>   org-save-outline-visibility(t 1 nil nil)
>   org-babel-execute-buffer(nil)
>   call-interactively(org-babel-execute-buffer nil nil)
> #v-
> 
> Looking at the macro for org-save-outline-visibility, I think the
> problem has to do with the last two arguments being passed in as nil
> nil.  I don't, however, know how this is happening.
> 
> I know that I probably haven't given enough information to actually
> diagnose this bug.  Can anyone give me a hand on what my next debugging
> step should be for this problem?
> 

Have you tried C-c C-c on each source block in the buffer? If one (or more)
fails, you know what to do.

If they all work fine, then I'd do a binary chop to get a minimal
example.  Then edebug org-babel-execute-buffer on the minimal example
(if the macro causes problems with edebug, define a new function,
org-babel-execute-buffer-do-not-save-outline-visibility, which does not
invoke the macro and debug that: if that works, then there is probably
some funky interaction with the macro.) In each iteration of the loop,
record the beginning of the match and the end of the match: that'll tell
you which block is being executed.

The simplest solution of course is to send the whole thing to Eric
S. :-) [1]

HTH,
Nick

[1] http://www.snopes.com/college/exam/barometer.asp

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

* Re: [babel] help debugging org-babel-execute-buffer
  2010-07-27  4:41 ` Nick Dokos
@ 2010-07-27  6:33   ` Austin Frank
  0 siblings, 0 replies; 6+ messages in thread
From: Austin Frank @ 2010-07-27  6:33 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 603 bytes --]

On Tue, Jul 27 2010, Nick Dokos wrote:

> Have you tried C-c C-c on each source block in the buffer? If one (or
> more) fails, you know what to do.

I went back and named all of my source blocks so that I would get some
debugging information from the *Messages* buffer.  The error is thrown
when org-babel-execute-buffer has executed the last block in the file.
The error is not thrown when I evaluate any single block individually.

I'll try more of your suggestions later.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [babel] help debugging org-babel-execute-buffer
  2010-07-27  3:14 [babel] help debugging org-babel-execute-buffer Austin Frank
  2010-07-27  4:41 ` Nick Dokos
@ 2010-08-19  5:33 ` Nick Dokos
  2010-08-25 14:50   ` Eric Schulte
  1 sibling, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2010-08-19  5:33 UTC (permalink / raw)
  To: Austin Frank; +Cc: nicholas.dokos, emacs-orgmode

Austin Frank <austin.frank@gmail.com> wrote:


> I have a document that always throws an error when I call
> org-babel-execute-buffer.  I'd guess that there's one particular block
> that is to blame, but I can't tell which block babel is in at the point
> when the error is thrown.
> 
> The error is:
> 
> #v+
> Debugger entered--Lisp error: (invalid-function org-save-outline-visibility)
>   org-save-outline-visibility(t 1 nil nil)
>   org-babel-execute-buffer(nil)
>   call-interactively(org-babel-execute-buffer nil nil)
> #v-
> 
> Looking at the macro for org-save-outline-visibility, I think the
> problem has to do with the last two arguments being passed in as nil
> nil.  I don't, however, know how this is happening.
> 

I think this is a bug: org-save-outline-visibility is indeed a macro,
defined in org.el, but ob.el does not require org.el, so when it is
compiled, the compiler thinks it's a function that will be defined elsewhere.
If the uncompiled ob.el is loaded, there should be no problem.

Two possible solutions:

- (require 'org) in ob.el.
- move the definition of the macro to org-macs.el (which is required by ob.el
  *and* org.el.)

I'd vote for the second, but Carsten and/or Eric might have a different
preference.

Nick

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

* Re: [babel] help debugging org-babel-execute-buffer
  2010-08-19  5:33 ` Nick Dokos
@ 2010-08-25 14:50   ` Eric Schulte
  2010-08-27 14:21     ` Eric Schulte
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2010-08-25 14:50 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

Hi Nick,

Thanks for hunting this bug down.

Nick Dokos <nicholas.dokos@hp.com> writes:

> Austin Frank <austin.frank@gmail.com> wrote:
>
>
>> I have a document that always throws an error when I call
>> org-babel-execute-buffer.  I'd guess that there's one particular block
>> that is to blame, but I can't tell which block babel is in at the point
>> when the error is thrown.
>> 
>> The error is:
>> 
>> #v+
>> Debugger entered--Lisp error: (invalid-function org-save-outline-visibility)
>>   org-save-outline-visibility(t 1 nil nil)
>>   org-babel-execute-buffer(nil)
>>   call-interactively(org-babel-execute-buffer nil nil)
>> #v-
>> 
>> Looking at the macro for org-save-outline-visibility, I think the
>> problem has to do with the last two arguments being passed in as nil
>> nil.  I don't, however, know how this is happening.
>> 
>
> I think this is a bug: org-save-outline-visibility is indeed a macro,
> defined in org.el, but ob.el does not require org.el, so when it is
> compiled, the compiler thinks it's a function that will be defined elsewhere.
> If the uncompiled ob.el is loaded, there should be no problem.
>
> Two possible solutions:
>
> - (require 'org) in ob.el.

This first solution can't work, because org.el requires ob.el, and
circular requires are not allowed.

> 
> - move the definition of the macro to org-macs.el (which is required
>   by ob.el *and* org.el.)
>
> I'd vote for the second, but Carsten and/or Eric might have a different
> preference.
>

I agree this sounds like a good solution, if Carsten agrees then I will
apply it.

Thanks -- Eric

>
> Nick
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [babel] help debugging org-babel-execute-buffer
  2010-08-25 14:50   ` Eric Schulte
@ 2010-08-27 14:21     ` Eric Schulte
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Schulte @ 2010-08-27 14:21 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

This fix has now been applied.  Best -- Eric

"Eric Schulte" <schulte.eric@gmail.com> writes:

> Hi Nick,
>
> Thanks for hunting this bug down.
>
> Nick Dokos <nicholas.dokos@hp.com> writes:
>
>> Austin Frank <austin.frank@gmail.com> wrote:
>>
>>
>>> I have a document that always throws an error when I call
>>> org-babel-execute-buffer.  I'd guess that there's one particular block
>>> that is to blame, but I can't tell which block babel is in at the point
>>> when the error is thrown.
>>> 
>>> The error is:
>>> 
>>> #v+
>>> Debugger entered--Lisp error: (invalid-function org-save-outline-visibility)
>>>   org-save-outline-visibility(t 1 nil nil)
>>>   org-babel-execute-buffer(nil)
>>>   call-interactively(org-babel-execute-buffer nil nil)
>>> #v-
>>> 
>>> Looking at the macro for org-save-outline-visibility, I think the
>>> problem has to do with the last two arguments being passed in as nil
>>> nil.  I don't, however, know how this is happening.
>>> 
>>
>> I think this is a bug: org-save-outline-visibility is indeed a macro,
>> defined in org.el, but ob.el does not require org.el, so when it is
>> compiled, the compiler thinks it's a function that will be defined elsewhere.
>> If the uncompiled ob.el is loaded, there should be no problem.
>>
>> Two possible solutions:
>>
>> - (require 'org) in ob.el.
>
> This first solution can't work, because org.el requires ob.el, and
> circular requires are not allowed.
>
>> 
>> - move the definition of the macro to org-macs.el (which is required
>>   by ob.el *and* org.el.)
>>
>> I'd vote for the second, but Carsten and/or Eric might have a different
>> preference.
>>
>
> I agree this sounds like a good solution, if Carsten agrees then I will
> apply it.
>
> Thanks -- Eric
>
>>
>> Nick
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-08-27 14:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-27  3:14 [babel] help debugging org-babel-execute-buffer Austin Frank
2010-07-27  4:41 ` Nick Dokos
2010-07-27  6:33   ` Austin Frank
2010-08-19  5:33 ` Nick Dokos
2010-08-25 14:50   ` Eric Schulte
2010-08-27 14:21     ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).