emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] "header-args :eval inline-only" not working


From: Berry, Charles
Subject: Re: [O] "header-args :eval inline-only" not working
Date: Sun, 20 Aug 2017 02:07:42 +0000

> On Aug 19, 2017, at 6:10 PM, Vikas Rawal <address@hidden> wrote:
> 
>> 
>> 
>> The first problem is that you have babel code *inside* a macro.  Since 
>> macros are run after babel executes, nothing will happen.
> 
> From the manual: "Org expands macros at the very beginning of the export 
> process.”
> 
> These macros run fine if I allow code evaluation. Macro replacement happens 
> first, and then the code evaluation. That is not the problem.

You are correct. Sorry.


> 
>> 
>> Next, there is no `:eval inline-only'.  That seem to work only because only 
>> the negative cases are checked. i.e. it is the same as `:eval yes' or even  
>> `:eval yes-please-and-thank-you’.
> 
> Again, from the manual:

> 
> "To evaluate just the inline code blocks, set org-export-babel-evaluate to 
> inline-only. Isolating the option to allow inline evaluations separate from 
> ‘src’ code block evaluations during exports is not for security but for 
> avoiding any delays due to recalculations, such as calls to a remote 
> database.”
> 

There is a bug in the documentation  -- `org-export-babel-evaluate' is 
obsolete. It should say `org-export-use-babel'.  

But that part of the manual is irrelevant to what the `:eval' header does.  
There is no `inline-only' value in either the documentation or in the lisp 
code.  So, `inline-only' acts like `yes' for the reason I stated earlier.


> With current org, I get this behaviour only if I globally set the option. But 
> that somehow disables ":results”.
> 

Right. `:results' is a babel header.  When babel is off, the babel headers are 
not acted upon.

Setting `org-export-use-babel' to `nil' or `inline-only' turns off babel for 
src blocks.


> With older org, everything works as it should.

Older than this:

---
commit ec615b192d703a0201ceefd46897e4636ff00a38
Author: Nicolas Goaziou <address@hidden>
Date:   Thu Apr 28 17:25:31 2016 +0200

    Fix `org-export-babel-evaluate' handling 
---


The behavior was purposely changed. With `inline-only' none of the babel 
operations will be executed for src blocks  -- i.e. the src blocks and existing 
results (if any) will be exported as is.  

Users should avoid touching `org-export-use-babel' for almost all purposes.  It 
does not do the equivalent of setting `:eval' globally.

Chuck 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]