> On Jul 5, 2018, at 10:46 AM, William Denton <w...@pobox.com> wrote:
> 
> Here's a very simple R command in an inline code block:
> 
> # -----
> What is 1 + 1?  src_R{1+1} {{{results(=2=)}}}
> # -----
> 
> Exporting this to PDF we get:
> 
> # -----
> What is 1 + 1? 2 2

Or exporting to to latex 

What is 1 + 1?  \texttt{2} \texttt{2}

The results macro gets initialized by `org-macro-initialize-templates' which is 
run run before babel, the macro returns `=2=', and babel does not remove this 
when it adds the result again.

A work-around is to put this null macro:

# ----
#+macro: results
# ----

in your buffer to strip out the existing inline results.

I do not get why this wasn't detected before - the pre-babel call to 
{{{results( )}}} has been in the code since last year.

Also, shouldn't the docstring  for `org-macro-initialize-templates' mention 
that "n", "author", "email", "keyword", "results", and "title" get set?

Chuck




Reply via email to