From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: [BUG] src_blocks - :results raw and replace don't work together Date: Mon, 07 Jul 2014 13:59:23 +0200 Message-ID: <87y4w5gz1g.fsf@gmail.com> References: <87vbraroza.fsf@gmail.com> <877g3pcw4j.fsf@gmail.com> <8738edig5t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X47aQ-0006Rh-PF for emacs-orgmode@gnu.org; Mon, 07 Jul 2014 08:00:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X47aK-0000Ex-MG for emacs-orgmode@gnu.org; Mon, 07 Jul 2014 07:59:58 -0400 Received: from plane.gmane.org ([80.91.229.3]:60272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X47aK-0000En-FU for emacs-orgmode@gnu.org; Mon, 07 Jul 2014 07:59:52 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X47a8-0001CC-5M for emacs-orgmode@gnu.org; Mon, 07 Jul 2014 13:59:40 +0200 Received: from e178189211.adsl.alicedsl.de ([85.178.189.211]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Jul 2014 13:59:40 +0200 Received: from tjolitz by e178189211.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Jul 2014 13:59:40 +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 Andreas Leha writes: > Hi Thorsten, >> My use-case is actually this, and it won't work with wrapped results: >> >> ,---- >> | ** Utility Function :ARCHIVE: >> | >> | #+name: create-subtree-with-dblock >> | #+header: :var name="foo" >> | #+header: :var prms=":bar loo" >> | #+header: :results replace raw >> | #+begin_src emacs-lisp >> | (format >> | (concat "\n\n** Overview :READONLY:\n\n" >> | "#+begin: %s %s\n\n#+end:\n") >> | name prms) >> | #+end_src >> | >> | #+results: dblock >> | >> | >> | ** Overview :READONLY: >> | >> | #+begin: foo :bar loo >> | >> | #+end: >> `---- > > > I am not in the position to answer this. But the combo "raw replace" is > problematic, I think, in that it is hard to say how much there is to be > replaced. So I think some delimiters (as produced by :wrap) are > necesarry in the general case. I really don't want to dig into the Org Babel internals here, but that might well be the reason, since inserting multi-line raw Org syntax into the buffer makes it hard to tell whats new and whats old without some extra work/bookkeeping (doing a diff or so ...). > If I understand correctly, you want to nest blocks: A source block > nested in a results block. I think, that is not possible. So, for that > use case, I guess, another construct (other than results block) would be > necessary. Is a single ,---- | #+results: dblock `---- line seen as block (together will the following results)? Would surprise me, but I don't know. I don't want to nest blocks, I want to insert plain raw Org syntax into the buffer that is subsequently treated just like the other content I typed in by hand before (assuming the the leading #+results: line does not affect the contents usual interpretation). Maybe I'm bending Org-modes flexibility a bit too much here, but this is my real-world use-case. -- cheers, Thorsten