From: stardiviner <numbchild@gmail.com>
To: roberthambrock@gmail.com
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH 2/4] ob-clojure.el: Add ClojureScript interface
Date: Wed, 12 Feb 2020 21:16:15 +0800 [thread overview]
Message-ID: <87v9ocuesg.fsf@gmail.com> (raw)
In-Reply-To: <20180422205003.87836-3-roberthambrock@gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi, any update on this patch? I still have this feature reminder in my GTD.
Really hope ob-clojure.el can support ClojureScript too.
If possible, hope this can integrate with current CIDER new session manager "sesman".
roberthambrock@gmail.com writes:
> From: Robert Hambrock <roberthambrock@gmail.com>
>
> * lisp/ob-clojure.el (org-babel-execute:clojure): Implemented :target,
> which allows selection of connection.
> * lisp/ob-clojure.el (org-babel-execute:clojurescript): New
> ClojureScript interface that uses :target flag to specify `cljs`
> evaluation target.
> ---
> lisp/ob-clojure.el | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
> index 93674b552..7f7c24ff1 100644
> --- a/lisp/ob-clojure.el
> +++ b/lisp/ob-clojure.el
> @@ -129,7 +129,8 @@ using the :show-process parameter."
> (cider
> (require 'cider)
> (let ((result-params (cdr (assq :result-params params)))
> - (show (cdr (assq :show-process params))))
> + (show (cdr (assq :show-process params)))
> + (connection (cider-current-connection (cdr (assq :target params)))))
> (if (member show '(nil "no"))
> ;; Run code without showing the process.
> (progn
> @@ -137,7 +138,7 @@ using the :show-process parameter."
> (let ((nrepl-sync-request-timeout
> org-babel-clojure-sync-nrepl-timeout))
> (nrepl-sync-request:eval expanded
> - (cider-current-connection))))
> + connection)))
> (setq result
> (concat
> (nrepl-dict-get response
> @@ -171,7 +172,7 @@ using the :show-process parameter."
> (nrepl--merge response resp)
> ;; Update the status of the nREPL output session.
> (setq status (nrepl-dict-get response "status")))
> - (cider-current-connection))
> + connection)
>
> ;; Wait until the nREPL code finished to be processed.
> (while (not (member "done" status))
> @@ -211,6 +212,9 @@ using the :show-process parameter."
> (condition-case nil (org-babel-script-escape result)
> (error result)))))
>
> +(defun org-babel-execute:clojurescript (body params)
> + (org-babel-execute:clojure body (cons '(:target . "cljs") params)))
> +
> (provide 'ob-clojure)
>
> ;;; ob-clojure.el ends here
- --
[ stardiviner ]
I try to make every word tell the meaning what I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
-----BEGIN PGP SIGNATURE-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5D+p8UHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsNcZwf8DtemZgXwNYF7SidMtURACKAEZkkN
wxRWB6MyZ5O4AbnOxTIwYrp+GiGMshrA24NIsWvb9IPQUK4yquzukxzH+Z1/fpK/
iQpbplhFjIS2Pvzh1o+Fe1nH9jYjJx7gg6JlUAuXiJF0qHntw/XHbPRjOcF7u450
jkN/iyh7UbQd1Ds/Yy/rISi846c4Ezx6eKGH6X5btWvFjF4dop/GxA7WWl73HMyk
769pLiMRZAhy0dIKj1daQ769P0V5dS5XpZvwXy8AxJP/0sjO38x6DLpANRI92C4A
gUpI5q3lGBc4frxHDpudBkIuOhX1e42n+AUGCTXB7b7Ktl7RXiTCwwP/ng==
=KcNL
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2020-02-12 13:16 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-22 20:49 [PATCH 0/4] Clojure mode patches roberthambrock
2018-04-22 20:50 ` [PATCH 1/4] org-src.el: Fixed dynamic fontification bug roberthambrock
2018-04-23 9:23 ` Nicolas Goaziou
2018-04-22 20:50 ` [PATCH 2/4] ob-clojure.el: Add ClojureScript interface roberthambrock
2018-04-23 2:45 ` stardiviner
2018-04-23 9:24 ` Nicolas Goaziou
2018-04-29 14:47 ` stardiviner
2018-10-25 6:11 ` stardiviner
2020-02-12 13:16 ` stardiviner [this message]
2020-02-12 17:09 ` Bastien
[not found] ` <87y2t6fqwj.fsf@gmail.com>
2020-02-13 16:04 ` [PATCH] " Bastien
2020-02-14 5:14 ` stardiviner
2020-02-14 10:02 ` Bastien
2020-02-14 15:17 ` stardiviner
2020-02-14 5:24 ` stardiviner
2020-02-14 10:02 ` Bastien
2020-02-14 15:15 ` stardiviner
2020-02-14 20:40 ` Bastien
2020-02-15 0:42 ` Tim Cross
2020-02-16 23:17 ` Bastien
2020-02-16 23:33 ` Tim Cross
2020-02-16 23:51 ` Bastien
2020-04-28 9:29 ` [BUG] ob-clojure.el new backend 'inf-clojure not compatible with latest version inf-clojure stardiviner
2020-05-22 15:12 ` Bastien
2020-02-18 13:01 ` [PATCH] Re: ob-clojure.el: Add ClojureScript interface stardiviner
2020-02-18 13:15 ` Bastien
2020-02-19 15:51 ` stardiviner
2018-04-22 20:50 ` [PATCH 3/4] ob-clojure.el: Use :ns flag in org-src-edit roberthambrock
2018-04-23 9:26 ` Nicolas Goaziou
2018-04-29 14:47 ` stardiviner
2018-04-22 20:50 ` [PATCH 4/4] ob-clojure.el: Add ClojureScript tangle language extension roberthambrock
2018-04-23 9:28 ` Nicolas Goaziou
2018-04-23 9:29 ` [PATCH 0/4] Clojure mode patches Nicolas Goaziou
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=87v9ocuesg.fsf@gmail.com \
--to=numbchild@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=roberthambrock@gmail.com \
/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).