From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Cowley Subject: Re: org-export-babel-evaluate and header arguments Date: Thu, 10 Mar 2016 19:10:41 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeAfH-0005QL-Vq for emacs-orgmode@gnu.org; Thu, 10 Mar 2016 19:10:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeAfD-0007Ka-Vb for emacs-orgmode@gnu.org; Thu, 10 Mar 2016 19:10:47 -0500 Received: from mail-qk0-x234.google.com ([2607:f8b0:400d:c09::234]:36514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeAfD-0007KQ-NO for emacs-orgmode@gnu.org; Thu, 10 Mar 2016 19:10:43 -0500 Received: by mail-qk0-x234.google.com with SMTP id s68so41626023qkh.3 for ; Thu, 10 Mar 2016 16:10:43 -0800 (PST) Received: from Sonmi451.home (seas1211.wireless-pennnet.upenn.edu. [158.130.108.189]) by smtp.gmail.com with ESMTPSA id f108sm2819540qgf.15.2016.03.10.16.10.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Mar 2016 16:10:42 -0800 (PST) In-reply-to: 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 Charles C. Berry writes: > On Wed, 9 Mar 2016, Anthony Cowley wrote: > >> >> If I have org-export-babel-evaluate set to nil, source blocks are not >> evaluated on export. However, if a source block has a :var header >> argument that calls another source block, I am prompted if the callee >> should be evaluated. >> >> Given that the caller is not to be evaluated, I'm not sure I see a >> reason for the :var to be evaluated. > > What gives here is that `org-babel-get-src-block-info' needs to develop > all the header arguments regardless of evaluation of the code block, so > :var gets handled. > >> Is there a way I can disable this argument evaluation? > > Something like: > > :var a=(and org-export-babel-evaluate (org-sbe "abc")) > > > See C-h f org-sbe RET > > HTH, > > Chuck Thanks for the tip, Chuck! This works out very well with one minor caveat: Setting org-export-babel-evaluate to nil means that C-c C-c no longer properly evaluates a block with such a header. This means that exporting must be enabled during development. Other than that little quibble, I've gotten this to work in both tiny tests and with complicated, slow to evaluate documents, so I'm pleased. A minor note about org-sbe documentation is that header arguments need not be in a table, but should simply be passed as a single string as the first argument to org-sbe. This is inferable from the documentation, but a bit oblique. Anthony