From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [babel] help debugging org-babel-execute-buffer Date: Tue, 27 Jul 2010 00:41:00 -0400 Message-ID: <18331.1280205660@gamaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=57956 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Odc51-0006SH-7Q for emacs-orgmode@gnu.org; Tue, 27 Jul 2010 00:47:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Odbyt-0007Im-8N for emacs-orgmode@gnu.org; Tue, 27 Jul 2010 00:41:32 -0400 Received: from vms173015pub.verizon.net ([206.46.173.15]:58328) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Odbyt-0007Ic-4V for emacs-orgmode@gnu.org; Tue, 27 Jul 2010 00:41:31 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173015.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L6700JA590CTH40@vms173015.mailsrvcs.net> for emacs-orgmode@gnu.org; Mon, 26 Jul 2010 23:41:02 -0500 (CDT) In-reply-to: Message from Austin Frank of "Mon, 26 Jul 2010 23:14:31 EDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Austin Frank Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Austin Frank 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