From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: org-babel R, export, and :result value raw Date: Thu, 15 Sep 2011 15:45:06 -0600 Message-ID: <87vcst8oo3.fsf@gmail.com> References: <874o0dzge2.fsf@cantab.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4JlK-0001sw-A2 for emacs-orgmode@gnu.org; Thu, 15 Sep 2011 17:46:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4JlI-0006UR-LR for emacs-orgmode@gnu.org; Thu, 15 Sep 2011 17:46:26 -0400 Received: from mail-gw0-f48.google.com ([74.125.83.48]:58468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4JlI-0006UK-Il for emacs-orgmode@gnu.org; Thu, 15 Sep 2011 17:46:24 -0400 Received: by gwj22 with SMTP id 22so3249219gwj.35 for ; Thu, 15 Sep 2011 14:46:24 -0700 (PDT) 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: Christophe Rhodes Cc: emacs-orgmode@gnu.org Hi Christophe, This issue of result wrappers (e.g., raw org html) not playing well with result types (e.g., vector, scalar) came up a couple of months ago on this mailing list and was not resolved. I've just pushed up a change which should fix this problem, along with an R-specific fix so that R respects the "scalar" and "verbatim" :results header arguments so that the following now works. #+begin_src R :results raw scalar "[[file:bar.png]]" #+end_src Best -- Eric Christophe Rhodes writes: > Hi, > > Consider the following org-mode file, assuming that org-babel support > for emacs lisp and R is active: > > --- begin --- > #+TITLE: Foo > > #+begin_src emacs-lisp :exports results :results value raw > "[[file:foo.png]]" > #+end_src > > #+results: > [[foo.png]] > > #+begin_src R :exports results :results value raw > "[[file:bar.png]]" > #+end_src > #+results: > [[file:bar\.png]] > --- end --- > > The problem is probably obvious from the above, but to be explicit: the > intent is to generate raw org-mode from the code blocks (this case is > hugely simplified from my actual application), producing links to images > which will then be part of the eventual exported document. For emacs > lisp, this works fine; for R, the path through files and specifically > org-babel-import-elisp-from-file / org-babel-string-read causes the > return value to be misinterpreted, introducing an extra backslash, and > therefore generating bogus export files. > > (This used to work for my use case in org-mode 7.4, and does not work in > org-mode 7.6; I looked at HEAD to see if I could identify a fix, but did > not find one -- I'm sorry if I missed it) > > Thanks, > > Christophe > > -- Eric Schulte http://cs.unm.edu/~eschulte/