emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: joseph.corneli.orgmode--- via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: Ag Ibragimov <agzam.ibragimov@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: patch: ob-clojure improvements
Date: Fri, 09 Oct 2020 22:17:39 +0100	[thread overview]
Message-ID: <227c9d17b3c8083eb5b605fa608cf9bc@hyperreal.enterprises> (raw)
In-Reply-To: <m2y2oimdjf.fsf@gmail.com>

Nice work, I did some testing here...

* Comment: Should babashka be added as an option for custom?

(defcustom org-babel-clojure-backend nil
   "Backend used to evaluate Clojure code blocks."
   :group 'org-babel
   :type '(choice
	  (const :tag "inf-clojure" inf-clojure)
	  (const :tag "cider" cider)
	  (const :tag "slime" slime)
	  (const :tag "Not configured yet" nil)))

* I wonder if there’s something wrong here?

... Inside ‘ob-clojure-eval-with-cider’

(push (or (nrepl-dict-get response "root-ex")
		    (nrepl-dict-get response "ex")
		    (nrepl-dict-get
		     response (if (or (member "output" result-params)
				      (member "pp" result-params))
				  "out"
				"value")))
		result0)

That didn’t work for me, using an instance of Cider *connected to
babashka*.  But it did work when I swapped "value" and "out"!

- Testing code and inspecting with edebug:

#+begin_src clojure :backend cider :results output
   (range 10)
#+end_src

* Lastly, the documentation and implementation have drifted apart...?

https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html

Ag Ibragimov writes:

> Hi everyone, here's my attempt to add clojure CLI and babashka support 
> for ob-clojure.el
> 
> - Adds a header parameter to override org-babel-clojure-backend
> - Adds :args param (right now only used for clojure-cli)
> 
> I have tested it with these minimal cases:
> 
> #+begin_src clojure :backend clj-cli :args "-Sdeps '{:deps {inflections 
> {:mvn/version \"0.13.2\"}}}'"
>   (use 'inflections.core)
>   (plural "word")
> #+end_src
> 
> #+begin_src clojure :backend babashka :results output
>   (range 10)
> #+end_src
> 
> Please let me know what you think. Any advice is appreciated, since I 
> have never contributed before. Thank you.


      parent reply	other threads:[~2020-10-09 21:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-20  6:55 Ag Ibragimov
2020-06-20  8:23 ` stardiviner
2020-07-02 22:43   ` agzam.ibragimov
2020-07-03  3:10     ` stardiviner
2020-07-03  3:53       ` Tim Cross
2021-02-02 12:11         ` Christopher Miles
2021-02-02 19:52           ` Tim Cross
2021-02-03  0:13             ` Christopher Miles
2021-02-03  6:36               ` Tim Cross
2021-02-03 11:59                 ` Christopher Miles
2020-09-04 15:24     ` Bastien
2020-10-09 21:17 ` joseph.corneli.orgmode--- via General discussions about Org-mode. [this message]

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=227c9d17b3c8083eb5b605fa608cf9bc@hyperreal.enterprises \
    --to=emacs-orgmode@gnu.org \
    --cc=agzam.ibragimov@gmail.com \
    --cc=joseph.corneli.orgmode@hyperreal.enterprises \
    --subject='Re: patch: ob-clojure improvements' \
    /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

Code repositories for project(s) associated with this 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).