[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [BUG] src_blocks - :results raw and replace don't work together
From: |
Thorsten Jolitz |
Subject: |
Re: [O] [BUG] src_blocks - :results raw and replace don't work together |
Date: |
Mon, 28 Jul 2014 16:46:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Sebastien Vauban <address@hidden>
writes:
> Thorsten Jolitz wrote:
>> Nick Dokos <address@hidden> writes:
>>
>>> Thorsten Jolitz <address@hidden>
>>> writes:
>>>
>>>> Hi List,
>>>>
>>>> evaluating this 3 times does not work as expected:
>>>>
>>>> ,----
>>>> | * A
>>>> |
>>>> | #+header: :results raw replace
>>>> | #+begin_src emacs-lisp
>>>> | (+ 2 2)
>>>> | #+end_src
>>>> |
>>>> | #+results:
>>>> | 4
>>>> | 4
>>>> | 4
>>>> `----
>>>>
>>>> Independent from argument order, 'replace' (which should be default
>>>> anyway) is ignored.
>>>
>>> Right - `raw' inserts results without delimiters so org has no idea
>>> where they end and cannot delete them (try org-babel-remove-result)
>>> or replace them.
>>
>> ok, I see
>>
>> from `org-babel-remove-result':
>> ,----
>> | (when (looking-at (concat org-babel-result-regexp ".*$")) ...)
>> `----
>>
>> seems a bit tricky to adapt this to 'raw results ...
>>
>> But at least there should be a hint in the manual that ':results raw
>> replace' is not supposed to work, and what would be a possible
>> workaround.
>
> Workarounds:
>
> - A block wrapper makes it possible for the entirety of the results to
> be clearly located, regardless of their contents, and replaced (with
> new results) by Babel upon code block re-evaluation, or
>
> - :results drawer
Thx. I somehow remember that my problem was related to the recently
discussed issue of creating new headlines as results of source blocks,
and to the fact that only headlines can contain headlines, so wrapping
in blocks and drawers does not really work.
I finally solved that problem for me by simply inserting the new headers
from Emacs Lisp without using Org-Babel, although a few workarounds were
proposed in the mentioned thread on this mailing list (a real solution
too? unfortunately lost track ...).
--
cheers,
Thorsten
- Re: [O] [BUG] src_blocks - :results raw and replace don't work together, (continued)
Re: [O] [BUG] src_blocks - :results raw and replace don't work together, Nick Dokos, 2014/07/07
Re: [O] [BUG] src_blocks - :results raw and replace don't work together, Thorsten Jolitz, 2014/07/07