From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [bugs] Export to HTML requires issuing org-babel-execute-buffer; results replace fails Date: Mon, 23 Jan 2012 21:05:59 -0700 Message-ID: <87d3a9n3rs.fsf@gmx.com> References: <87k44is34h.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpXe4-0007Hz-Jk for emacs-orgmode@gnu.org; Mon, 23 Jan 2012 23:06:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpXe2-0007oP-L4 for emacs-orgmode@gnu.org; Mon, 23 Jan 2012 23:06:08 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:50541) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RpXe2-0007oH-Ca for emacs-orgmode@gnu.org; Mon, 23 Jan 2012 23:06:06 -0500 In-Reply-To: (Leo Alekseyev's message of "Mon, 23 Jan 2012 21:50:53 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Leo Alekseyev Cc: Emacs orgmode Leo Alekseyev writes: > On Mon, Jan 23, 2012 at 11:58 AM, Eric Schulte wro= te: >> Leo Alekseyev 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. =C2=A0However, running HTML export without org-babel-execute-bu= ffer >>> 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=3D"conv1.png" > #+BEGIN_SRC R :results output silent > cat.fname.link <- function() { cat(plot.filename,"\n",sep=3D"") } > 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 > --=20 Eric Schulte http://cs.unm.edu/~eschulte/