From: Aaron Ecay <aaronecay@gmail.com>
To: Tamas Papp <tkpapp@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: ob-R ignores ess-eval-visibly?
Date: Wed, 09 Sep 2015 20:30:18 +0100 [thread overview]
Message-ID: <87oahbbdbp.fsf@gmail.com> (raw)
In-Reply-To: <87mvx2zm1g.fsf@tamas.ihs.ac.at>
Hi Tamas,
2015ko irailak 4an, Tamas Papp-ek idatzi zuen:
>
> Hi,
>
> I prefer ESS not to wait for results of evaluating R code, especially if
> it takes a longer time (eg estimating a model in RStan, 1-2 minutes), so
> I have
>
> (setq ess-eval-visibly 'nowait)
>
> But I find that ob-R ignores this, eg evaluating
>
> #+BEGIN_SRC R :results none
> Sys.sleep(10)
> #+END_SRC
>
> I looked at the source and I think I understand why this is: the results
> need to be inserted into the buffer. However, could there be an
> exception for :results none, when they are not needed? Then I could put
> code which takes a long time into these blocks, and they would not block
> my Emacs.
I think this suggestion will not deal well with the following cases:
1. :cache – the code block hash in the #+results line needs to be
updated. For correctness, this should only be done after the block
has finished execution
2. :session – the long-running code block will block the session
subprocess, so that any further code blocks executed in the document
will block
The remaining cases (:results none :cache no :session no) pick out a very
specific set of circumstances, and I’m not sure it would be worth the
additional complexity (conceptually and implementationally) to support
it. For example, it would probably entail changing all backends, in
addition to core babel code, since the current backend API contains just
one function to evaluate-wait-and-return-result.
OTOH it might be possible to add an async evaluation facility to babel,
with an explicit enabling condition (:async yes) and corresponding new
function(s) in the backend API, which could be implemented gradually and
only where they made sense. But that’s a big project.
--
Aaron Ecay
next prev parent reply other threads:[~2015-09-09 19:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 7:22 ob-R ignores ess-eval-visibly? Tamas Papp
2015-09-09 19:30 ` Aaron Ecay [this message]
2015-09-09 21:10 ` Rainer M Krug
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oahbbdbp.fsf@gmail.com \
--to=aaronecay@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=tkpapp@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.