From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Rhodes Subject: org-babel R, export, and :result value raw Date: Thu, 15 Sep 2011 21:42:45 +0100 Message-ID: <874o0dzge2.fsf@cantab.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4Im2-0006FY-LY for emacs-orgmode@gnu.org; Thu, 15 Sep 2011 16:43:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4Im1-0008LR-Fh for emacs-orgmode@gnu.org; Thu, 15 Sep 2011 16:43:06 -0400 Received: from lo.gmane.org ([80.91.229.12]:51605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4Im1-0008Kq-4w for emacs-orgmode@gnu.org; Thu, 15 Sep 2011 16:43:05 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R4Ilz-0002Ha-TF for emacs-orgmode@gnu.org; Thu, 15 Sep 2011 22:43:03 +0200 Received: from 81.174.155.115 ([81.174.155.115]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Sep 2011 22:43:03 +0200 Received: from csr21 by 81.174.155.115 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Sep 2011 22:43:03 +0200 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: emacs-orgmode@gnu.org 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