Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-04-06 Thread Frederick Giasson
Hi, Yes, you are. There is a "go to the topic" action on the left panel. Anyway, there is not much to see, just some pointers to start a discussion. Haa great thanks, see it now :) Let me revise a few things, suggest another patch, and then will start to think about these things. Thanks,

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-04-06 Thread Nicolas Goaziou
Frederick Giasson writes: > Humm, from the page you provided, I don't see any threads, but just > the initial message, am I looking at the right thing? Yes, you are. There is a "go to the topic" action on the left panel. Anyway, there is not much to see, just some pointers to

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-04-06 Thread Frederick Giasson
Hi Nicolas, However, I am not sure neither how generic such a solution could be, and what would still be required to implement in each OB plugin. My (very little) experience so far is the Python prototype that John wrote, and then my analysis of the Clojure OB plugin. As I was explaining in

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-04-06 Thread Nicolas Goaziou
Hello, Frederick Giasson writes: > However, I am not sure neither how generic such a solution could be, > and what would still be required to implement in each OB plugin. My > (very little) experience so far is the Python prototype that John > wrote, and then my analysis of

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-04-06 Thread Frederick Giasson
Hi Nicolas, Here is a blog post that explains the changes I did. I still have one improvement to do (but don't how it could be done or even if it can be done) which is explained at the end of the post:

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-04-06 Thread Nicolas Goaziou
Hello, Frederick Giasson writes: > Here is a blog post that explains the changes I did. I still have one > improvement to do (but don't how it could be done or even if it can be > done) which is explained at the end of the post: > >

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-04-05 Thread Frederick Giasson
Hi John, Here is a blog post that explains the changes I did. I still have one improvement to do (but don't how it could be done or even if it can be done) which is explained at the end of the post:

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-30 Thread Frederick Giasson
Hi Jon, You can see a commented out version for shell blocks here: https://github.com/jkitchin/jmax/blob/master/jmax-org.el#L936 It looks like I just redefined the org-babel-execute:sh function after it was loaded. That may not be recommended good practice, but it works ;) I am not sure why

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-30 Thread John Kitchin
a Frederick Giasson writes: > Hi John, > >> you should rename it org-babel-async-execute:clojure, and adapt it to >> run clojure. > > Yes > >> I wrote the function in the org-file that is that post, and executed the >> code block (C-c C-c) which "registers" the function for that instance of >>

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-30 Thread Frederick Giasson
Hi John, you should rename it org-babel-async-execute:clojure, and adapt it to run clojure. Yes I wrote the function in the org-file that is that post, and executed the code block (C-c C-c) which "registers" the function for that instance of emacs. I am not sure I understand here. Once

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-30 Thread John Kitchin
you should rename it org-babel-async-execute:clojure, and adapt it to run clojure. I wrote the function in the org-file that is that post, and executed the code block (C-c C-c) which "registers" the function for that instance of emacs. Later you could put it in an init file that is loaded when

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-30 Thread Frederick Giasson
Hi John! Interesting approach :) I am really new with org-mode, but I will try to adapt for ob-clojure.el. One question: this function "org-babel-async-execute:python", where should I register it? I guess it should replace "org-babel-execute:python"? Thanks for this precision will work on

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-30 Thread Eric S Fraga
On Wednesday, 30 Mar 2016 at 08:30, John Kitchin wrote: > This might not be totally true. Which is why I said "minimal support" ;-) But you are correct: there are mechanisms for asynchronous threading in Emacs. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-30 Thread John Kitchin
This might not be totally true. In this post I use a few different asynchronous approaches to running Python that do something like what you want, perhaps especially the last bit of the post. http://kitchingroup.cheme.cmu.edu/blog/2015/11/20/Asynchronously-running-python-blocks-in-org-mode/

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-30 Thread Frederick Giasson
Hi Eric, Note: I am not sure if this is something related to Org-mode, or ob-clojure or Cider. None of these directly. It's Emacs, basically: it has very minimal support for threading so the whole process (Emacs) is waiting for the sub-process (Clojure) to finish before doing anything else.

Re: [O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-30 Thread Eric S Fraga
On Tuesday, 29 Mar 2016 at 13:44, Frederick Giasson wrote: [...] > Note: I am not sure if this is something related to Org-mode, or > ob-clojure or Cider. None of these directly. It's Emacs, basically: it has very minimal support for threading so the whole process (Emacs) is waiting for the

[O] ob-clojure: possible to display results as soon as something is written to STDOUT?

2016-03-29 Thread Frederick Giasson
Hi everybody, I was wondering if it was possible for Org-mode to write results in #+RESULTS as soon as something is written to STDOUT? Here is my issue: I am writing Notebooks in Clojure using org-mode (clojure). I have some long-running procedures in the notebook that output the current