From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: :results replace not always working Date: Tue, 25 Jan 2011 09:14:23 -0700 Message-ID: <87fwsg6hkk.fsf@gmail.com> References: <4D3EBA7E.1040608@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=42576 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhmJb-0005BY-9O for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 12:04:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhmJZ-0001Hu-Nx for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 12:04:22 -0500 Received: from mail-iw0-f169.google.com ([209.85.214.169]:46470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhmJZ-0001Hj-Js for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 12:04:21 -0500 Received: by iwn40 with SMTP id 40so6456466iwn.0 for ; Tue, 25 Jan 2011 09:04:20 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer M Krug Cc: emacs-orgmode Hi Rainer, I have fixed the problem with ":results org" so it should now work as expected. The ":results replace raw" can never work as expected because raw results are inserted directly into the Org buffer with no wrappers to delimit the results, so there is no way to programmatically identify which text is the results and which is part of the Org buffer. Thanks -- Eric Rainer M Krug writes: > Hi > > Bewlow an example, illustrating cases where :results replace does not > work, dependent of the type and content. Each of the source blocks was > executed twice: > > ":results output org replace" did not work > ":results output raw replace" did work, but not with all content. > > In addition, there is still the leading space in the firest line of the > output. > > > > #+begin_src R :results output org replace > cat("[[file1.pdf]]\n") > cat("[[file2.pdf]]\n") > #+end_src > > #+results: > #+BEGIN_ORG > [[file1.pdf]] > [[file2.pdf]] > #+END_ORG > #+BEGIN_ORG > [[file1.pdf]] > [[file2.pdf]] > #+END_ORG > > > #+begin_src R :results output raw replace > cat("[[file1.pdf]]\n") > cat("[[file2.pdf]]\n") > #+end_src > > #+results: > [[file1.pdf]] > [[file2.pdf]] > > #+begin_src R :results output raw replace > cat("---\n") > cat("[[file1.pdf]]\n") > cat("[[file2.pdf]]\n") > cat("---\n") > #+end_src > > #+results: > --- > [[file1.pdf]] > [[file2.pdf]] > --- > --- > [[file1.pdf]] > [[file2.pdf]] > --- > > > > > Cheers, > > Rainer