From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG] src_blocks - :results raw and replace don't work together
Date: Mon, 07 Jul 2014 13:59:23 +0200 [thread overview]
Message-ID: <87y4w5gz1g.fsf@gmail.com> (raw)
In-Reply-To: oluzjglto4m.fsf@med.uni-goettingen.de
Andreas Leha <andreas.leha@med.uni-goettingen.de> 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
next prev parent reply other threads:[~2014-07-07 12:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 0:28 [BUG] src_blocks - :results raw and replace don't work together Thorsten Jolitz
2014-07-07 1:41 ` Thomas S. Dye
2014-07-07 2:03 ` Thorsten Jolitz
2014-07-07 13:48 ` Thomas S. Dye
2014-07-07 9:29 ` Andreas Leha
2014-07-07 10:15 ` Thorsten Jolitz
2014-07-07 11:04 ` Thorsten Jolitz
2014-07-07 11:16 ` Andreas Leha
2014-07-07 11:59 ` Thorsten Jolitz [this message]
2014-07-07 13:56 ` Nick Dokos
2014-07-07 14:54 ` Grant Rettke
2014-07-07 15:31 ` Thorsten Jolitz
2014-07-07 23:40 ` Grant Rettke
2014-07-08 2:01 ` Nick Dokos
2014-07-07 15:40 ` Thorsten Jolitz
2014-07-28 13:59 ` Sebastien Vauban
2014-07-28 14:46 ` Thorsten Jolitz
2014-08-04 1:20 ` Eric Schulte
2014-08-06 1:15 ` Thorsten Jolitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4w5gz1g.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).