[O] ob-clojure can't cross source block handle :var in :noweb source block

2019-08-27 Thread numbch...@gmail.com
I have bellowing example: ```org #+NAME: read-in-wxid #+begin_src clojure :var cwd=(file-truename "~/Documents/WeChat/wxid/") (require '[clojure.java.io :as io]) (def directory (io/file cwd)) (def files (filter #(.isFile %) (file-seq directory))) #+end_src #+RESULTS[<2019-08-28 09:12:24> 84a1210d

Re: [O] ob-clojure with tangling current broken

2019-01-22 Thread stardiviner
Frederick Giasson writes: > Hi, > > That's why I added a patch recently. Now Nicolas already applied my > patch. You should already seen it now. > > Yeah I just received that email right after I sent mine. Didn't know it was > in the pipeline, I just re-subscribed to the mailing list. > >

Re: [O] ob-clojure with tangling current broken

2019-01-22 Thread Frederick Giasson
Hi, That's why I added a patch recently. Now Nicolas already applied my > patch. You should already seen it now. > Yeah I just received that email right after I sent mine. Didn't know it was in the pipeline, I just re-subscribed to the mailing list. > > > > It turns out that the culprit is the

Re: [O] ob-clojure with tangling current broken

2019-01-21 Thread stardiviner
Frederick Giasson writes: > Hi, > > I updated org-mode to latest dev version recently and I was wondering why I > was > seeing namespaces appended to each [clojure] code block I was tangling (which > generates unusable tangled Clojure source files) That's why I added a patch recently. Now Ni

[O] ob-clojure with tangling current broken

2019-01-21 Thread Frederick Giasson
Hi, I updated org-mode to latest dev version recently and I was wondering why I was seeing namespaces appended to each [clojure] code block I was tangling (which generates unusable tangled Clojure source files) It turns out that the culprit is the following line: https://code.orgmode.org/bzg/org-

Re: [O] ob-clojure should not tangle with inserting (ns ..) line when no :ns specified.

2019-01-13 Thread stardiviner
I updated the patch by adding a test. With command "make test" I got: ``` Tangled 0 code blocks from babel.org passed 132/828 ob-tangle/no-excessive-id-insertion-on-tangle passed 133/828 ob-test/org-babel-combine-header-arg-lists failed 134/828 org-missing-dependency/test-ob-R

Re: [O] ob-clojure should not tangle with inserting (ns ..) line when no :ns specified.

2019-01-09 Thread stardiviner
stardiviner writes: > The ob-clojure tangle will insert ~(ns ..)~ from babel header argument :ns or > use defualt ~(ns user)~. > >#+begin_src clojure :eval no :ns "" :tangle > "data/code/xunfei-clj-demo/project.clj" :results link :file > "data/code/xunfei-clj-demo/project.clj" >(defpr

Re: [O] ob-clojure should not tangle with inserting (ns ..) line when no :ns specified.

2018-12-05 Thread stardiviner
Tim Cross writes: > Sorry, only just noticed this response in my spam folder - gmail is > tagging your messages as spam because it could not verify it was legit. Yeah, I found some other's emails in Gmail Spam too. I usually regularly check Spam folder a week. Might because GPG sign? I don't k

Re: [O] ob-clojure should not tangle with inserting (ns ..) line when no :ns specified.

2018-12-04 Thread Tim Cross
Sorry, only just noticed this response in my spam folder - gmail is tagging your messages as spam because it could not verify it was legit. stardiviner writes: > Tim Cross writes: > >> I think the problem here is that really, project.clj is not a valid >> clojure source file. It is really a c

Re: [O] ob-clojure should not tangle with inserting (ns ..) line when no :ns specified.

2018-12-02 Thread stardiviner
Tim Cross writes: > I think the problem here is that really, project.clj is not a valid > clojure source file. It is really a clojure data file or clojure > snippet (I mean in the sense that you cannot execute it or include it as > a dependency within a clojure program - it is input data for th

Re: [O] ob-clojure should not tangle with inserting (ns ..) line when no :ns specified.

2018-11-30 Thread Tim Cross
stardiviner writes: > The ob-clojure tangle will insert ~(ns ..)~ from babel header argument :ns or > use defualt ~(ns user)~. > >#+begin_src clojure :eval no :ns "" :tangle > "data/code/xunfei-clj-demo/project.clj" :results link :file > "data/code/xunfei-clj-demo/project.clj" >(defp

[O] ob-clojure should not tangle with inserting (ns ..) line when no :ns specified.

2018-11-30 Thread stardiviner
The ob-clojure tangle will insert ~(ns ..)~ from babel header argument :ns or use defualt ~(ns user)~. #+begin_src clojure :eval no :ns "" :tangle "data/code/xunfei-clj-demo/project.clj" :results link :file "data/code/xunfei-clj-demo/project.clj" (defproject xunfei-clj-demo "0.1.0-SNAPS

Re: [O] ob-clojure will error result when contains comment

2017-07-13 Thread Tim Cross
Your second block can't run in a repl unless you have additional definitions you are not showing here. The error messages are complaining that 1. There is no function called sum. Clojure does not have a sum function and your not defining one in this block, so that makes perfect sense. 2. The func

Re: [O] ob-clojure will error result when contains comment

2017-07-13 Thread numbch...@gmail.com
I run the both blocks fine in CIDER REPL, that's weird. I have the following special settings for ob-clojure. ```elisp (add-to-list 'org-babel-default-header-args:clojure '(:eval . "yes")) (add-to-list 'org-babel-default-header-args:clojure '(:results . "value pp")) (add-t

Re: [O] ob-clojure will error result when contains comment

2017-07-13 Thread Tim Cross
I think there is something wrong with your environment and your second block is not legal code. If you run your second block directly in a clojure repl, you will get the same errors, which means it isn't an org issue. Executing your examples with org from master branch I get #+BEGIN_SRC clojure

[O] ob-clojure will error result when contains comment

2017-07-12 Thread numbch...@gmail.com
Here is the examples: #+BEGIN_SRC clojure (+ 1 1) ;=> 2 #+END_SRC #+RESULTS: : class clojure.lang.LispReader$ReaderExceptionclass java.lang.RuntimeExceptionRuntimeException EOF while reading, starting at line 1 clojure.lang.Util.runtimeException (Util.java:221) #+BEGIN_SRC clojure :results valu

Re: [O] ob-clojure evaluate error when Org-mode buffer has ns clojure code

2017-06-20 Thread numbch...@gmail.com
Hi, Tim, Excuse my obstinacy, I still think the problem is in `ob-clojure.el` Because when I: ```org #+BEGIN_SRC clojure :session (ns user-kk) #+END_SRC #+BEGIN_SRC clojure :session :results output (print "hi") (def "hello") #+END_SRC #+RESULTS: ``` The second block does not return result. w

Re: [O] ob-clojure evaluate error when Org-mode buffer has ns clojure code

2017-06-17 Thread numbch...@gmail.com
I see, thanks very much. [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Sun, Jun 18, 2017 at 9:10 AM, Tim Cross wro

Re: [O] ob-clojure evaluate error when Org-mode buffer has ns clojure code

2017-06-17 Thread Tim Cross
It looks like you have a combination of both clojure errors and possibly org babel errors. You need to sort out the clojure errors before you can verify there are any problems with org babel clojure support. You mention that > I start CIDER REPL session with `cider-jack-in` without project in >

Re: [O] ob-clojure evaluate error when Org-mode buffer has ns clojure code

2017-06-17 Thread numbch...@gmail.com
After a new evaluation. I found ```org #+BEGIN_SRC clojure (ns user (:require '[incanter.core :as mm])) #+END_SRC #+RESULTS: : class clojure.lang.Compiler$CompilerExceptionclass clojure.lang.Compiler$CompilerExceptionCompilerException java.lang.Exception: Found lib name 'incanter.core' containin

Re: [O] ob-clojure evaluate error when Org-mode buffer has ns clojure code

2017-06-17 Thread numbch...@gmail.com
I did configure `ob-clojure` with the following settings: ```elisp (require 'ob-clojure) ;; use CIDER as the Clojure execution backend (setq org-babel-clojure-backend 'cider) ;; Useful keybindings when using Clojure from Org ;; (org-defkey org-mode-map (kbd "C-x C-e") 'cider-eval-last-sexp) ;; (

Re: [O] ob-clojure evaluate error when Org-mode buffer has ns clojure code

2017-06-16 Thread Tim Cross
My guess is that cider is not finding the incanter package in the classpath when the first block attempts to evaluate. Another issue is that your not using any session options, so your two blocks will be evaluated in separate environments - not a real problem with your current example, but will be

[O] ob-clojure evaluate error when Org-mode buffer has ns clojure code

2017-06-16 Thread numbch...@gmail.com
When Org-mode buffer like this: #+BEGIN_SRC clojure (ns my.kk (:require '[incanter.core :as kk])) #+END_SRC #+BEGIN_SRC clojure (print "hi") (def "hello") #+END_SRC #+RESULTS: When I have `(ns ..)` namespace clojure code in buffer, the second `(print ..)` clojure result nothing. But when

Re: [O] ob-clojure broken

2017-03-04 Thread Tim Cross
thanks. There is a later message to the list where I attached the patch. tim On 4 March 2017 at 23:04, numbch...@gmail.com wrote: > I already applied the patch at here: https://emacs. > stackexchange.com/questions/30857/clojure-code-evaluation- > in-org-mode-produces-no-output > > > [stardivin

Re: [O] ob-clojure broken

2017-03-04 Thread numbch...@gmail.com
I already applied the patch at here: https://emacs.stackexchange.com/questions/30857/clojure-code-evaluation-in-org-mode-produces-no-output [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF

[O] ob-clojure broken

2017-03-01 Thread Tim Cross
With current 9.0.5 org-plus-contrib package, ob-clojure is broken and trying to evaluate clojure source blocks just gives a code block produces no output message. The problem is in the org-babel-execute:clojure function. This function has the following bit of code (setq result (nrepl-dict-

Re: [O] ob-clojure?

2016-09-29 Thread Frederick Giasson
Hi Lawrence, Is there an ob-clojure in elpa? If not should I use this ? You may be interested in this version: http://fgiasson.com/blog/index.php/2016/06/16/improving-org-babel-clojure/ I didn't find the time to push int

Re: [O] ob-clojure?

2016-09-19 Thread Thomas S. Dye
Aloha Lawrence, Lawrence Bottorff writes: > Is there an ob-clojure in elpa? If not should I use this > ? > > LB Is the ob-clojure that comes with Org mode unsuitable? All the best, Tom -- Thomas S. Dye http://www.tsdye.co

[O] ob-clojure?

2016-09-19 Thread Lawrence Bottorff
Is there an ob-clojure in elpa? If not should I use this ? LB

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 start a discussion.

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 this

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 the Clojure OB plugin

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: http://fgiasson.com/blog/index.php/2016/04/05/using-clojure-in-org-mode-and-implementing-asyn

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: > > http://fgiasson.com/blog/index.php/2016/04/05/using-clojure-in-

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: http://fgiasson.com/blog/index.php/2016/04/05/using-clojure-in-org-mode-and-implementing-async

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 it

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 >> ema

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 you

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 Ema

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 th

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/ Mayb

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 sub

[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 sta

[O] ob-clojure :session echo settings

2014-04-16 Thread Michael Bach
Hi, Emacs 24.4. org-mode latest master clojure-mode latest MELPA cider latest MELPA Following the instructions in [1], I set up session evaluation for clojure in the snippet: #+BEGIN_SRC org #+PROPERTY: header-args:clojure :session :cache no #+begin_src clojure (+ 1 2 3) #+end_src #+RESULTS: :

Re: [O] ob-clojure: ':results pp' parses the output as a string value

2014-04-14 Thread Phill Wolf
Yes, perfect! On Mon, Apr 14, 2014 at 6:35 AM, Oleh wrote: > Hi Phil, > > Could you test my last commit? Your case should be working now. > > regards, > Oleh >

Re: [O] ob-clojure: ':results pp' parses the output as a string value

2014-04-14 Thread Oleh
Hi Phil, Could you test my last commit? Your case should be working now. regards, Oleh

[O] ob-clojure: ':results pp' parses the output as a string value

2014-04-13 Thread Phill Wolf
I am getting a strange effect from ":results pp" and ob-clojure. "It\n looks\n like\n this.\n" I built Emacs 24.4.50 from trunk and cloned ob-clojure from git today. clojure-mode is 20140331 from ELPA. cider is 20140411 from ELPA. Two examples follow. 1. uses =:results pp= ("and\n looks\n lik

Re: [O] ob-clojure: presentation of map structures?

2014-02-02 Thread Soapy Smith
On Sun, 2014-02-02 at 01:42 -0500, Phill Wolf wrote: > Floundering among the options, I tried :results value pp. It yielded > this: > > : "{\"Pluto\" 5,\n \"Plattsburgh\" 4,\n \"Philadelphia\" 3,\n > \"Sankt-Peterburg\" 2,\n \"Paris\" 1,\n \"Peru\" 0}\n" > > > pprint's good intentions are evid

Re: [O] ob-clojure: presentation of map structures?

2014-02-01 Thread Eric Schulte
Phill Wolf writes: > How may I use an Org document to illustrate Clojure src blocks that produce > Clojure data structures -- particularly maps -- as pretty-printed text? I > think I am using Org "master" in Emacs 24.3. > > #+BEGIN_SRC clojure :results value <> > (zipmap > ["Peru" "Paris" "San

[O] ob-clojure: presentation of map structures?

2014-02-01 Thread Phill Wolf
How may I use an Org document to illustrate Clojure src blocks that produce Clojure data structures -- particularly maps -- as pretty-printed text? I think I am using Org "master" in Emacs 24.3. #+BEGIN_SRC clojure :results value <> (zipmap ["Peru" "Paris" "Sankt-Peterburg" "Philadelphia" "Plat