From: Aaron Ecay <aaronecay@gmail.com>
To: Henrik Singmann <henrik.singmann@psychologie.uni-freiburg.de>,
emacs-orgmode@gnu.org
Subject: Re: [PATCH] WAS Re: Bug: problem w/ R code blocks [8.3beta (release_8.3beta-362-ga92789 <at> /usr/local/share/emacs/site-lisp/org/)]
Date: Fri, 10 Oct 2014 00:38:34 -0400 [thread overview]
Message-ID: <874mvcy1x1.fsf@gmail.com> (raw)
In-Reply-To: <m131ph$1pv$1@ger.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 572 bytes --]
Hi Henrik,
2014ko urriak 8an, Henrik Singmann-ek idatzi zuen:
>
> I unfortunately can confirm that org-babel-R-initiate-session contains
> the lines you mentioned at exactly 15 lines down. Deleting ob-R.elc
> (which was of the same date as ob-R.el) didn't affect anything as did
> reloading org uncompiled (C-u C-c C-x !).
I could reproduce this, also with recent git org and ESS. It looks like
ESS is doing more complicated things, necessitating a more thorough
check that the session is in fact ready.
Can you test the attached patch? It fixed the problem for me.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-R-fix-interaction-with-ESS-for-new-sessions.patch --]
[-- Type: text/x-diff, Size: 1045 bytes --]
From b91526d932728749609b27809eecb588c04e1a1e Mon Sep 17 00:00:00 2001
From: Aaron Ecay <aaronecay@gmail.com>
Date: Fri, 10 Oct 2014 00:35:41 -0400
Subject: [PATCH] ob-R: fix interaction with ESS for new sessions
* lisp/ob-R.el (org-babel-R-initiate-session): Properly wait on a new
ESS process.
---
lisp/ob-R.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index ea33031..5d5006f 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -265,9 +265,10 @@ This function is called by `org-babel-execute-src-block'."
;; Session buffer exists, but with dead process
(set-buffer session))
(require 'ess) (R)
- (ess-wait-for-process
- (get-process (or ess-local-process-name
- ess-current-process-name)))
+ (let ((R-proc (get-process (or ess-local-process-name
+ ess-current-process-name))))
+ (while (process-get R-proc 'callbacks)
+ (ess-wait-for-process R-proc)))
(rename-buffer
(if (bufferp session)
(buffer-name session)
--
2.1.2
[-- Attachment #3: Type: text/plain, Size: 24 bytes --]
Thanks,
--
Aaron Ecay
next prev parent reply other threads:[~2014-10-10 4:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 20:16 Bug: problem w/ R code blocks [8.3beta (release_8.3beta-362-ga92789 @ /usr/local/share/emacs/site-lisp/org/)] Ed Kademan
2014-09-16 13:03 ` Rainer M Krug
2014-09-16 20:17 ` Bug: problem w/ R code blocks [8.3beta (release_8.3beta-362-ga92789 <at> /usr/local/share/emacs/site-lisp/org/)] Charles Berry
2014-09-17 3:25 ` [PATCH] WAS " Charles Berry
2014-09-17 7:20 ` Rainer M Krug
2014-09-17 7:26 ` Rainer M Krug
2014-09-17 23:14 ` Cook, Malcolm
[not found] ` <D4772401B9D976478C0895769BE3E7920F1ED33C@MBSRV02.sgc.loc>
2014-09-18 21:13 ` Cook, Malcolm
2014-09-18 21:27 ` Aaron Ecay
2014-09-19 7:50 ` Rainer M Krug
2014-09-18 22:34 ` Charles C. Berry
2014-09-18 22:45 ` Charles C. Berry
2014-10-07 19:34 ` Henrik Singmann
2014-10-07 21:17 ` Ista Zahn
2014-10-08 1:59 ` Charles Berry
2014-10-08 1:21 ` Charles Berry
2014-10-08 9:57 ` Henrik Singmann
2014-10-10 4:38 ` Aaron Ecay [this message]
2014-10-10 9:18 ` Henrik Singmann
2014-10-10 16:36 ` Aaron Ecay
2014-12-09 21:07 ` Cook, Malcolm
2014-09-18 1:17 ` Aaron Ecay
2014-09-18 15:17 ` Charles C. 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=874mvcy1x1.fsf@gmail.com \
--to=aaronecay@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=henrik.singmann@psychologie.uni-freiburg.de \
/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).