emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@ucsd.edu>
To: Vikas Rawal <vikaslists@agrarianresearch.org>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: "header-args :eval inline-only" not working
Date: Sun, 20 Aug 2017 02:07:42 +0000	[thread overview]
Message-ID: <06F7619D-A294-4AAE-89BA-DB9FC17FEDC2@ucsd.edu> (raw)
In-Reply-To: <40F87DC3-9AF2-43D4-9E9D-11826219EA79@agrarianresearch.org>


> On Aug 19, 2017, at 6:10 PM, Vikas Rawal <vikaslists@agrarianresearch.org> 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 <mail@nicolasgoaziou.fr>
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	other threads:[~2017-08-20  2:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-19 16:36 "header-args :eval inline-only" not working Vikas Rawal
2017-08-19 19:27 ` Nicolas Goaziou
2017-08-19 20:36   ` Vikas Rawal
2017-08-19 22:10     ` Berry, Charles
2017-08-20  1:10       ` Vikas Rawal
2017-08-20  2:07         ` Berry, Charles [this message]
2017-08-20  2:24           ` Vikas Rawal
2017-08-20  2:43             ` Berry, Charles
2017-08-20  3:26               ` Vikas Rawal
2017-08-20 10:21                 ` Nicolas Goaziou
2017-08-20 12:41                   ` Vikas Rawal
2017-08-20 16:51                   ` Berry, Charles
2017-08-26  8:34                     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06F7619D-A294-4AAE-89BA-DB9FC17FEDC2@ucsd.edu \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=vikaslists@agrarianresearch.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).