[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: |
Sat, 19 Aug 2017 22:10:35 +0000 |
> On Aug 19, 2017, at 1:36 PM, Vikas Rawal <address@hidden> wrote:
>
>
>> On 20-Aug-2017, at 12:57 AM, Nicolas Goaziou <address@hidden> wrote:
>>
>> Hello,
>>
>> Vikas Rawal <address@hidden> writes:
>>
>>> My org-version (latest on org ELPA) is: Org mode version 9.0.9
>>> (9.0.9-82-gb862c2-elpa @ /Users/vikas/.emacs.d/elpa/org-20170814/)
>>>
>>> The following is not working:
>>>
>>> #+PROPERTY: header-args :eval inline-only
>>>
>>> ":eval never-export” works; but ":eval inline-only" does not.
>>
>> What is "not working”?
>
> ":eval inline-only" has no effect. It still tries to evaluate all code blocks.
>
>
>>> I can deal with this by globally changing the option using:
>>>
>>> (org-export-babel-evaluate (quote inline-only))
>>>
>>> But this creates another problem. After this, org does not respect
>>> “:exports results” and exports both the code and results.
>>
>> Could you provide an ECM?
>
> Please see the attached file.
Which contains:
#+PROPERTY: header-args :session nss70 :eval inline-only
#+macro: getcell src_emacs-lisp[:results value raw]{(org-table-get-remote-range
"$1" "$2")}
#+macro: roundnum src_emacs-lisp[:results value raw]{(round (string-to-number
(org-table-get-remote-range "$1" "$2")))}
>
> When I export this, it still tries to evaluate the code block
> ind1_t2_hhd_code. If I use (org-export-babel-evaluate (quote inline-only)),
> it does not evaluate ind1_t2_hhd_code code block but it exports both the
> code and the output.
>
The first problem is that you have babel code *inside* a macro. Since macros
are run after babel executes, nothing will happen.
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'.
Instead of a macro containing babel, you can use `call_whatnot(a,b)' statements
for inline execution, where a src block named `whatnot' handles the desired
computations. You can execute these in advance of exporting and specify `:eval
never-export'.
HTH,
Chuck
p.s. I did not see a bug.
- [O] "header-args :eval inline-only" not working, Vikas Rawal, 2017/08/19
- Re: [O] "header-args :eval inline-only" not working, Nicolas Goaziou, 2017/08/19
- Re: [O] "header-args :eval inline-only" not working, Vikas Rawal, 2017/08/19
- Re: [O] "header-args :eval inline-only" not working,
Berry, Charles <=
- Re: [O] "header-args :eval inline-only" not working, Vikas Rawal, 2017/08/19
- Re: [O] "header-args :eval inline-only" not working, Berry, Charles, 2017/08/19
- Re: [O] "header-args :eval inline-only" not working, Vikas Rawal, 2017/08/19
- Re: [O] "header-args :eval inline-only" not working, Berry, Charles, 2017/08/19
- Re: [O] "header-args :eval inline-only" not working, Vikas Rawal, 2017/08/19
- Re: [O] "header-args :eval inline-only" not working, Nicolas Goaziou, 2017/08/20
- Re: [O] "header-args :eval inline-only" not working, Vikas Rawal, 2017/08/20
- Re: [O] "header-args :eval inline-only" not working, Berry, Charles, 2017/08/20
- Re: [O] "header-args :eval inline-only" not working, Nicolas Goaziou, 2017/08/26