From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: Evaluating R source code line by line Date: Sat, 13 Dec 2014 14:38:22 -0500 Message-ID: <87vblf2vdd.fsf@gmail.com> References: <86y4qbkgei.fsf@me.localhost.invalid> <437630D3-66D0-4D3F-BCD2-5F1731776CAC@agrarianresearch.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzsWQ-0000h2-Dq for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 14:38:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzsWH-0006Qa-Ip for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 14:38:34 -0500 Received: from mail-qa0-x22b.google.com ([2607:f8b0:400d:c00::22b]:46072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzsWH-0006QW-Ed for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 14:38:25 -0500 Received: by mail-qa0-f43.google.com with SMTP id bm13so6647803qab.30 for ; Sat, 13 Dec 2014 11:38:24 -0800 (PST) In-Reply-To: <437630D3-66D0-4D3F-BCD2-5F1731776CAC@agrarianresearch.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Vikas Rawal , Daniele Pizzolli , org-mode mailing list Hi Vikas, 2014ko abenudak 13an, Vikas Rawal-ek idatzi zuen: >=20 > On 13-Dec-2014, at 3:42 pm, Daniele Pizzolli wrote: >> Look at: >> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html >>=20 >> Use ESS to step through evaluation line-by-line >>=20 >> Use C-c ' to visit the edit buffer for your code block >> Use ess-eval-line-and-step to evaluate each line in turn >>=20 >> ess-eval-line-and-step is usually bound to C-c C-n >=20 > 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 . I=E2=80=99m 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 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=E2=80=99t make all evaluation echo line-by-line. 2) Preserving line-by-line echoing mustn=E2=80=99t 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=E2=80=99s progressing. --=20 Aaron Ecay