From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: Inline code :results replace not working
Date: Mon, 10 Nov 2014 11:42:06 +0000 [thread overview]
Message-ID: <oluh9y7e0z5.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: 86y4rj2tm1.fsf@example.com
Hi Sebastien,
Sebastien Vauban <sva-news@mygooglest.com> writes:
> Andreas Leha wrote:
>> Sebastien Vauban <sva-news@mygooglest.com> writes:
>>> Andreas Leha wrote:
>>>>> For me, that's the correct behavior, as inline code blocks are
>>>>> *only expected to be evaluated during export*.
>>>>
>>>> I disagree here.
>>>
>>> Though, this is what Eric Schulte wrote:
>>>
>>> ┌────
>>> │ Currently inline blocks like don't associate themselves with their
>>> │ results, they are only expected to be evaluated on export.
>>> └────
>>>
>>> If things have changed, I'm not aware of it.
>>>
>>>> As limiting the use of inline code to eval-on-export-only renders
>>>> all the org-babel-execute-subtree and related functionality useless.
>>
>> I have been using inline results for reports quite a bit, but not
>> lately. I might be wrong here, but from my memory they used to work
>> (i.e. were replaceable) for a while (at least when 'wrapped') unless
>> they were set to produce 'raw' results (which was a serious limitation
>> and led me to change my workflow).
>>
>> PS: a quick check reveals that they are indeed not replaceable (even
>> when wrapped)
>>
>> Nonetheless, from a literate programming perspective, I think that
>> replaceable (and raw) inline results are definitely desirable.
>> Regardless of the state of their implementation in orgmode right now.
>
> FWIW, I'm not -- yet? -- convinced we should see the results of inline
> code blocks inlined in the paragraph (and I'm not sure either it does
> not cause interpretation problems); but, for sure, I'd love to be able
> to preview the value interactively, at least.
>
>> So, I do not doubt, that you and Nicolas are right with that
>> replaceable inline results are not implemented and are -- from
>> orgmodes perspective -- expected to be evaluated only during export.
>>
>> My message was meant more as a feature request saying that I consider
>> replaceable inline results useful and would like to see them supported
>> by org.
>
> Could you better explain your statement: "Limiting the use of inline
> code to eval-on-export-only renders all the org-babel-execute-subtree
> and related functionality useless"?
>
> I'm not sure to fully understand your use-case. That'd certainly be
> worth explaining why you think it must be changed in the first instance
> if you'd like Eric or Nicolas (or someone else) to change that.
>
Consider this simple toy example. If you press 'C-c C-v s' in the
subtree, the document is 'broken' for export. If you press 'C-c C-v s'
twice or more the document is 'broken' even for display.
--8<---------------cut here---------------start------------->8---
#+PROPERTY: header-args:R :session *testR*
* Simplistic Literate Program
Let us generate some data $X$ with
#+begin_src R :exports code :results none
X <- rnorm(1:1000)
#+end_src
and plot the density of it
#+begin_src R :results graphics :file test.png :exports both
plot(density(X))
#+end_src
#+results:
[[file:test.png]]
This data has mean src_R{mean(X)}.
--8<---------------cut here---------------end--------------->8---
Regards,
Andreas
next prev parent reply other threads:[~2014-11-10 11:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 10:01 Inline code :results replace not working mcg
2014-11-08 21:27 ` Nicolas Goaziou
2014-11-10 9:21 ` Sebastien Vauban
2014-11-10 9:40 ` Andreas Leha
2014-11-10 10:27 ` Sebastien Vauban
2014-11-10 10:56 ` Andreas Leha
2014-11-10 11:16 ` Sebastien Vauban
2014-11-10 11:42 ` Andreas Leha [this message]
2014-11-10 16:23 ` Charles C. Berry
2014-11-10 17:03 ` Ista Zahn
2014-11-10 20:04 ` Grant Rettke
2014-11-10 20:45 ` Thomas S. Dye
2014-11-10 21:26 ` Grant Rettke
2014-11-11 1:53 ` Ista Zahn
2014-11-11 14:37 ` Grant Rettke
2014-11-13 18:40 ` Michael
2014-11-14 15:11 ` Grant Rettke
2014-11-12 9:03 ` Sebastien Vauban
2014-11-12 17:26 ` Charles Berry
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=oluh9y7e0z5.fsf@med.uni-goettingen.de \
--to=andreas.leha@med.uni-goettingen.de \
--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).