From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Babel source blocks Date: Wed, 21 Nov 2012 17:44:29 -0500 Message-ID: <8039.1353537869@alphaville> References: <20121121211502.GD6013@cardamom.adamsinfoserv.com> <7636.1353535594@alphaville> <20121121221531.GE6013@cardamom.adamsinfoserv.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbJ21-0005tn-1c for emacs-orgmode@gnu.org; Wed, 21 Nov 2012 17:44:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbJ1z-0008Ue-Rl for emacs-orgmode@gnu.org; Wed, 21 Nov 2012 17:44:32 -0500 Received: from g4t0015.houston.hp.com ([15.201.24.18]:9081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbJ1z-0008TL-Kn for emacs-orgmode@gnu.org; Wed, 21 Nov 2012 17:44:31 -0500 Received: from g4t0009.houston.hp.com (g4t0009.houston.hp.com [16.234.32.26]) by g4t0015.houston.hp.com (Postfix) with ESMTP id 762C58607 for ; Wed, 21 Nov 2012 22:44:30 +0000 (UTC) Received: from alphaville.americas.hpqcorp.net (alphaville.americas.hpqcorp.net [16.117.226.11]) by g4t0009.houston.hp.com (Postfix) with ESMTP id 650D7C045 for ; Wed, 21 Nov 2012 22:44:30 +0000 (UTC) Received: from alphaville (localhost [127.0.0.1]) by alphaville.americas.hpqcorp.net (Postfix) with ESMTP id E3F9247C0A for ; Wed, 21 Nov 2012 17:44:29 -0500 (EST) In-Reply-To: Message from Russell Adams of "Wed, 21 Nov 2012 16:15:31 CST." <20121121221531.GE6013@cardamom.adamsinfoserv.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Russell Adams wrote: > On Wed, Nov 21, 2012 at 05:06:34PM -0500, Nick Dokos wrote: > > Russell Adams wrote: > > > > > It appears that there is a discrepancy between Org's source blocks and > > > Babel processing. > > > > > > Org's source blocks all show up-case (#+BEGIN_SRC): > > > > > > http://orgmode.org/manual/Structure-of-code-blocks.html#Structure-of-code-blocks > > > > > > Babel only appears to process lower-case blocks (#+begin_src): > > > > > > http://orgmode.org/worg/org-contrib/babel/intro.html > > > > > > I can confirm in 7.8.10 that Babel is not executing blocks unless they > > > are lowercase, while Org's source block handling works normally with > > > either case. > > > > > > > I can't reproduce this with latest or with release_7.8.10: babel seems > > to execute source code blocks no matter what combination of upper/lower > > case letters go into forming the #+BEGIN_SRC/#+END_SRC markers. I press > > C-C C-c on a source code block and it is evaluated. Is that how you test > > or are you perhaps using a different criterion? > > > > Nick > > M-x org-babel-execute-buffer > I still cannot reproduce it. org-babel-execute-buffer calls org-babel-execute-src-block on every source block, which calls org-babel-get-src-block-info to get the info. org-babel-get-src-block-info let-binds case-fold-search to t before calling org-babel-where-is-src-block-head and therefore the latter should do a case-independent search for the #+begin_src part. That's indeed how things work in my case (both latest and 7.8.10). You might want to step through this chain with the debugger and make sure that things happen properly. But I don't see anything wrong in the current code (or the 7.8.10 code: afaict, it behaves identically in this respect). Nick > I was also having a problem with export skipping headlines that were > out of order, I hope I didn't combine the two. > > * One > > ** Two > > **** Three > > Three didn't export or have Babel execute. >