emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Evaluating R source code line by line


From: Aaron Ecay
Subject: Re: [O] Evaluating R source code line by line
Date: Sat, 13 Dec 2014 14:38:22 -0500
User-agent: Notmuch/0.18.1+51~gbbbdf04 (http://notmuchmail.org) Emacs/25.0.50.2 (x86_64-unknown-linux-gnu)

Hi Vikas,

2014ko abenudak 13an, Vikas Rawal-ek idatzi zuen:
> 
> On 13-Dec-2014, at 3:42 pm, Daniele Pizzolli <address@hidden> wrote:
>> Look at:
>> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html
>> 
>> Use ESS to step through evaluation line-by-line
>> 
>> Use C-c ' to visit the edit buffer for your code block
>> Use ess-eval-line-and-step to evaluate each line in turn
>> 
>> ess-eval-line-and-step is usually bound to C-c C-n
> 
> I know this and use it. But since my code evaluation is quite resource
> intensive, when I later evaluate the code using C-c C-c to insert
> results in my org buffer, it would be useful to see how far it is
> progressing.

See the thread beginning at
<http://mid.gmane.org/address@hidden>.  I’m not sure this
feature is actually workable, however, even aside from the performance
issues alluded to in that thread.  There are various methods that babel
uses to evaluate R code, not all of which are amenable to line-by-line
echoing.  In the future, I think babel should move towards an approach
which separates the code actually evaluated in R from the contents of
the code block further.  (See my patch at
<http://mid.gmane.org/address@hidden> for an example of what I
mean).  This will make line-by-line echoing confusing (since what would
be echoed has little relation to the actual code).

If enough people really want it, the let-binding around ess-eval-visibly-p
in ob-R.el can be removed, but IMO there should be an understanding that:
1) This won’t make all evaluation echo line-by-line.
2) Preserving line-by-line echoing mustn’t be allowed to block the
   evolution of other features that are incompatible with it.

For your use case, I would suggest adding print() calls in strategic
places in your long-running code, which will appear in the R buffer to
let you know how it’s progressing.

-- 
Aaron Ecay



reply via email to

[Prev in Thread] Current Thread [Next in Thread]