emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [bugs] Export to HTML requires issuing org-babel-execute-buffer;


From: Eric Schulte
Subject: Re: [O] [bugs] Export to HTML requires issuing org-babel-execute-buffer; results replace fails
Date: Mon, 23 Jan 2012 21:05:59 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Leo Alekseyev <address@hidden> writes:

> On Mon, Jan 23, 2012 at 11:58 AM, Eric Schulte <address@hidden> wrote:
>> Leo Alekseyev <address@hidden> writes:
>>
>>> Since all source blocks are evaluated on export, I don't think it
>>> should be necessary to issue org-babel-execute-buffer before invoking
>>> export.  However, running HTML export without org-babel-execute-buffer
>>> currently produces garbage output.
>>>
>>
>> What do you mean by "garbage" output?
>
> That wasn't a very good description, sorry.

No problem, thanks for clarifying.

[... moot bug removed ...]

>>
>> Could you isolate a minimal example demonstrating just the failure of
>> results replacement?
>
> Run the below code a few times with C-c C-v b, and you'll see
>
> ------------snip---------
> #+property: session *R-babel*
>
> #+NAME: foo
> #+HEADER: :var plot.filename="conv1.png"
> #+BEGIN_SRC R :results output silent
>   cat.fname.link <- function() { cat(plot.filename,"\n",sep="") }
>   cat.fname.link()
> #+END_SRC
>
> src_R[:results output replace]{ cat.fname.link() }
> ------------snip---------
>
>
> You can also replace src_R with
>
> #+begin_src R :results output raw replace :exports results
>  cat.fname.link()
> #+end_src
>
> and it will also fail to replace results.
>
> All the above examples were run with the latest pull of org.
>

Ah, I see now.  Unfortunately it is not possible to replace the results
of inline code blocks.  This is because there is no general way to
identify where the results begin and end.  Maybe adding [:results
silent] to your inline code blocks would solve the problem.  Then you
could evaluate the whole buffer, and could previews the values produced,
but would not have to worry about duplicate results.

Sorry I don't have a more satisfying answer.

Best,

>
> HTH,
>
> --Leo
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

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