* [PATCH 0/4] Clojure mode patches @ 2018-04-22 20:49 roberthambrock 2018-04-22 20:50 ` [PATCH 1/4] org-src.el: Fixed dynamic fontification bug roberthambrock ` (4 more replies) 0 siblings, 5 replies; 33+ messages in thread From: roberthambrock @ 2018-04-22 20:49 UTC (permalink / raw) To: emacs-orgmode; +Cc: Robert Hambrock From: Robert Hambrock <roberthambrock@gmail.com> Dear Org maintainer, These four patches are independent and can thus be applied individually. Please let me know if you have any questions. All the best, Robert Robert Hambrock (4): org-src.el: Fixed dynamic fontification bug ob-clojure.el: Add ClojureScript interface ob-clojure.el: Use :ns flag in org-src-edit ob-clojure.el: Add ClojureScript tangle language extension lisp/ob-clojure.el | 17 ++++++++++++++--- lisp/org-src.el | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) -- 2.16.3 ^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH 1/4] org-src.el: Fixed dynamic fontification bug 2018-04-22 20:49 [PATCH 0/4] Clojure mode patches roberthambrock @ 2018-04-22 20:50 ` roberthambrock 2018-04-23 9:23 ` Nicolas Goaziou 2018-04-22 20:50 ` [PATCH 2/4] ob-clojure.el: Add ClojureScript interface roberthambrock ` (3 subsequent siblings) 4 siblings, 1 reply; 33+ messages in thread From: roberthambrock @ 2018-04-22 20:50 UTC (permalink / raw) To: emacs-orgmode; +Cc: Robert Hambrock From: Robert Hambrock <roberthambrock@gmail.com> * lisp/org-src.el (org-src-font-lock-fontify-block): Fixed temporary buffer name. Clojure's Cider could not dynamically fontify Clojure subsections of the buffer. Removing the rogue space from the temporary buffername fixes this. --- lisp/org-src.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index ec32d7bf3..bd76aa5af 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -548,7 +548,7 @@ as `org-src-fontify-natively' is non-nil." (remove-text-properties start end '(face nil)) (with-current-buffer (get-buffer-create - (format " *org-src-fontification:%s*" lang-mode)) + (format "*org-src-fontification:%s*" lang-mode)) (let ((inhibit-modification-hooks nil)) (erase-buffer) ;; Add string and a final space to ensure property change. -- 2.16.3 ^ permalink raw reply related [flat|nested] 33+ messages in thread
* Re: [PATCH 1/4] org-src.el: Fixed dynamic fontification bug 2018-04-22 20:50 ` [PATCH 1/4] org-src.el: Fixed dynamic fontification bug roberthambrock @ 2018-04-23 9:23 ` Nicolas Goaziou 0 siblings, 0 replies; 33+ messages in thread From: Nicolas Goaziou @ 2018-04-23 9:23 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode Hello, roberthambrock@gmail.com writes: > * lisp/org-src.el (org-src-font-lock-fontify-block): Fixed temporary > buffer name. Clojure's Cider could not dynamically fontify Clojure > subsections of the buffer. Removing the rogue space from the temporary > buffername fixes this. This is not a rogue space; it is an Emacs convention for hidden buffers. Could it be a bug on the Cider side? Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH 2/4] ob-clojure.el: Add ClojureScript interface 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-22 20:50 ` roberthambrock 2018-04-23 2:45 ` stardiviner ` (4 more replies) 2018-04-22 20:50 ` [PATCH 3/4] ob-clojure.el: Use :ns flag in org-src-edit roberthambrock ` (2 subsequent siblings) 4 siblings, 5 replies; 33+ messages in thread From: roberthambrock @ 2018-04-22 20:50 UTC (permalink / raw) To: emacs-orgmode; +Cc: Robert Hambrock 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 -- 2.16.3 ^ permalink raw reply related [flat|nested] 33+ messages in thread
* Re: [PATCH 2/4] ob-clojure.el: Add ClojureScript interface 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 ` (3 subsequent siblings) 4 siblings, 0 replies; 33+ messages in thread From: stardiviner @ 2018-04-23 2:45 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Those patches are great. solve some of my problem. Does CIDER support ClojureScript natively so ob-clojure can integrate it? - -- [ stardiviner ] don't need to convince with trends. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrdSM0ACgkQG13xyVro msOzQQgAmJ9IJzDNNK1PirXfok2Teq4hSRZ+hNpxhH+p4+Fpd1p+MQXBAhrMsno5 2gV+wyjzshvMus2erk8O061e/ggzYt8ADuoha/NPjU/D3477CFzzuJj4FVaDiKkn 1lJCjHoR56h0xJK3PJxT72KHc1uQMMrsH3PzR2AoxfEEoSI56dlSvz3FgdXOQ8ha ODyZyHvSxFF5DzGvXUzXoVHH6SxlKzbdWKp0cAo7Ue3E9EcNYW7ASGryPW9KpyIk HOUYTurKhZIrYr7pG3zYzEWa1P1UFvoqwn1/SeR6sYKoVZo9nL81+Y2P4+h/IHqk mjlcjMoRNzIdqwNvGO5UP/cokSUJEg== =zief -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 2/4] ob-clojure.el: Add ClojureScript interface 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 ` (2 subsequent siblings) 4 siblings, 0 replies; 33+ messages in thread From: Nicolas Goaziou @ 2018-04-23 9:24 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode Hello, roberthambrock@gmail.com writes: > * 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. Thank you. > +(defun org-babel-execute:clojurescript (body params) > + (org-babel-execute:clojure body (cons '(:target . "cljs") params))) > + Please add a docstring to the function. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 2/4] ob-clojure.el: Add ClojureScript interface 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 4 siblings, 0 replies; 33+ messages in thread From: stardiviner @ 2018-04-29 14:47 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 roberthambrock@gmail.com writes: How about the progress now? - -- [ stardiviner ] don't need to convince with trends. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrl2u0ACgkQG13xyVro msMQBQgAxq0OkFQE+eXrBIZYBHAdyOha4mK/+i2RyeQX8nStsKAgvP3gCJRwkttc cCCdWH5fL0MDgWcxCMrbvZsMEXFTzKJXk+tE4BB9+PTTQ3T5zG+fMIifDOZqjo6W +OhGDFaxPiVYUFF444OVrWAVw/f6JescGDDVuveUPAiLm2A9+qkh3Nz7kROpDoGC yel9N6CuDOwZiFIDpvfsoWBAeyJNweKvhfhyHgWKiu11m6tkZ/gORdvYo+upc+YJ Oh5/OkXyKYGaX/zpIAyiA1dYthEG9pdsUPODsC3O8S6Hw+Zowseb8n7pbiXj6tOF 0VdNHgsfxEyqOL1T+DIKe+TMf38SsQ== =PkoS -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 2/4] ob-clojure.el: Add ClojureScript interface 2018-04-22 20:50 ` [PATCH 2/4] ob-clojure.el: Add ClojureScript interface roberthambrock ` (2 preceding siblings ...) 2018-04-29 14:47 ` stardiviner @ 2018-10-25 6:11 ` stardiviner 2020-02-12 13:16 ` stardiviner 4 siblings, 0 replies; 33+ messages in thread From: stardiviner @ 2018-10-25 6:11 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode, Nicolas Goaziou 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 Hi, @roberthambrock. I would like to have ob-clojure support ClojureScript too. But seems this patch is not merged yet, for a long time. Can I modify this patch and send to Org Mode? @Nicolas, can I do this? set Git commit author as "roberthambrock", and commiter as me. -- [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 2/4] ob-clojure.el: Add ClojureScript interface 2018-04-22 20:50 ` [PATCH 2/4] ob-clojure.el: Add ClojureScript interface roberthambrock ` (3 preceding siblings ...) 2018-10-25 6:11 ` stardiviner @ 2020-02-12 13:16 ` stardiviner 2020-02-12 17:09 ` Bastien 4 siblings, 1 reply; 33+ messages in thread From: stardiviner @ 2020-02-12 13:16 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode -----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----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 2/4] ob-clojure.el: Add ClojureScript interface 2020-02-12 13:16 ` stardiviner @ 2020-02-12 17:09 ` Bastien [not found] ` <87y2t6fqwj.fsf@gmail.com> 0 siblings, 1 reply; 33+ messages in thread From: Bastien @ 2020-02-12 17:09 UTC (permalink / raw) To: stardiviner; +Cc: roberthambrock, emacs-orgmode Hi, I hope you and/or Robert can take care of improvements for ob-clojure.el. I use it, so I'm comfortable testing patches, don't hesitate. Robert: I see old patches that haven't been answered, sorry for that. I hope you can resubmit them, possibly partly rewriting them on top of Org's master branch. Thanks! -- Bastien ^ permalink raw reply [flat|nested] 33+ messages in thread
[parent not found: <87y2t6fqwj.fsf@gmail.com>]
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface [not found] ` <87y2t6fqwj.fsf@gmail.com> @ 2020-02-13 16:04 ` Bastien 2020-02-14 5:14 ` stardiviner 2020-02-14 5:24 ` stardiviner 0 siblings, 2 replies; 33+ messages in thread From: Bastien @ 2020-02-13 16:04 UTC (permalink / raw) To: stardiviner; +Cc: roberthambrock, emacs-orgmode Hi, stardiviner <numbchild@gmail.com> writes: > And patches in attachments. Applied, thanks. I made some minor modifications: - I added the TINYCHANGE cookie in both messages - I replaced "ob-clojure.el: (...)" by "ob-clojure.el (...):" In general, try `C-x 4 a' on a change, either from magit or from the modified buffer: this will format a correct changelog entry. Also, users may need to figure out that ClojureScript src blocks need a proper environment to execute src blocks. I.e. we should recommend users to have their .org file within a ClojureScript project -- I added something along these lines in the ORG-NEWS entry. If you want to contribute further, you'd need to sign the FSF papers: https://orgmode.org/request-assign-future.txt Thanks! -- Bastien ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-13 16:04 ` [PATCH] " Bastien @ 2020-02-14 5:14 ` stardiviner 2020-02-14 10:02 ` Bastien 2020-02-14 5:24 ` stardiviner 1 sibling, 1 reply; 33+ messages in thread From: stardiviner @ 2020-02-14 5:14 UTC (permalink / raw) To: Bastien; +Cc: roberthambrock, emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Bastien <bzg@gnu.org> writes: > Hi, > > stardiviner <numbchild@gmail.com> writes: > >> And patches in attachments. > > Applied, thanks. Great! > > I made some minor modifications: > > - I added the TINYCHANGE cookie in both messages > - I replaced "ob-clojure.el: (...)" by "ob-clojure.el (...):" > > In general, try `C-x 4 a' on a change, either from magit or from > the modified buffer: this will format a correct changelog entry. A good advice tip. I will use it. Thanks. > > Also, users may need to figure out that ClojureScript src blocks > need a proper environment to execute src blocks. I.e. we should > recommend users to have their .org file within a ClojureScript > project -- I added something along these lines in the ORG-NEWS > entry. > > If you want to contribute further, you'd need to sign the FSF > papers: https://orgmode.org/request-assign-future.txt > I've already signed FSF papers before. Actually I contributed some patches already. :) > Thanks! - -- [ 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----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5GLL8UHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsOS7wf/XjDmlqgD0Us1RgDtarIXAfJDgIjy +S8tEgeSHJSmPFSpifDyYSxAKwRGE1b5v/uUHcxECCana9k8iQ/T7VwFb6vY8XNY NzpM1ZAErSNaOcFWOVH4yEoA8d6V/2Jir7p/SEblZid9HOC9zNpOzw4PxYr81/r5 Mof4/cQnwj1W6Z5MUqVj4rSotx3pBy1TqxCleGXj4EFsRBnJ6RMgvH+x3BYnLBAT 6zhle6hFrJtQGdiaH6YRHJ2ln52LTlozqnLCE2ROsp+ZDnS4lS5gp+2RIDnYPxq1 rszeDHWhAJcwmhPEikMzbmOGvy6X+nljVbLFJOzkFfsSkqFcam+onkLMzw== =T3Qi -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-14 5:14 ` stardiviner @ 2020-02-14 10:02 ` Bastien 2020-02-14 15:17 ` stardiviner 0 siblings, 1 reply; 33+ messages in thread From: Bastien @ 2020-02-14 10:02 UTC (permalink / raw) To: stardiviner; +Cc: roberthambrock, emacs-orgmode stardiviner <numbchild@gmail.com> writes: > I've already signed FSF papers before. Actually I contributed some > patches already. :) Argh, yes, sorry, my bad! I was confused because I saw TINYCHANGE in previous commit messages. -- Bastien ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-14 10:02 ` Bastien @ 2020-02-14 15:17 ` stardiviner 0 siblings, 0 replies; 33+ messages in thread From: stardiviner @ 2020-02-14 15:17 UTC (permalink / raw) To: Bastien; +Cc: roberthambrock, emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Bastien <bzg@gnu.org> writes: > stardiviner <numbchild@gmail.com> writes: > >> I've already signed FSF papers before. Actually I contributed some >> patches already. :) > > Argh, yes, sorry, my bad! I was confused because I saw TINYCHANGE in > previous commit messages. It's fine, I know you read many emails, Forgetting some minor stuff is excusable. - -- [ 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----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5GuhoUHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsPZigf+I9N8O/sK59GjD3VnLfYo6Yj1G6cQ FK1a+nZlxFJ/UGMOY5n+pX7LID+RXKOKyoEHflD8ZGJpz24Th8Ai+rdSPbjNjIXA ru0EsR553T1TY+6+UQRy2OGmghZcWRWfcnw5iiqJj1NlI3+i2dAiXlrvLSdk7VZG wumwqnfeyB9atVua/q6WXl8eVnvLfFFZmBgb/NXLebu94484Yz/h4QAtAhhpQPrT cVVaP3IKzSuYfatgVLMa59uQuEk8tmOjClaQ8pZbJU5S0R9urR5LNAeFBQI3IyVP bzVdTJWLjUuPCRcxk/xMdcZG3J78Sg94GNG4ZDLDi+bzDqFLjOZopXOaxg== =VuDO -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-13 16:04 ` [PATCH] " Bastien 2020-02-14 5:14 ` stardiviner @ 2020-02-14 5:24 ` stardiviner 2020-02-14 10:02 ` Bastien 1 sibling, 1 reply; 33+ messages in thread From: stardiviner @ 2020-02-14 5:24 UTC (permalink / raw) To: Bastien; +Cc: roberthambrock, emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 About this patch, last night, I try to test ob-clojurescript eval with CIDER connection. But no luck, the ClojureScript REPL connection always failed to start. I have problem on CIDER. So I have a request that can you take a test. Because on my side, ~(cider-current-connection "cljs")~ returns ~nil~ unable to test. I think this patch should work. Just for confirm. Thanks in advance. Bastien <bzg@gnu.org> writes: > Hi, > > stardiviner <numbchild@gmail.com> writes: > >> And patches in attachments. > > Applied, thanks. > > I made some minor modifications: > > - I added the TINYCHANGE cookie in both messages > - I replaced "ob-clojure.el: (...)" by "ob-clojure.el (...):" > > In general, try `C-x 4 a' on a change, either from magit or from > the modified buffer: this will format a correct changelog entry. > > Also, users may need to figure out that ClojureScript src blocks > need a proper environment to execute src blocks. I.e. we should > recommend users to have their .org file within a ClojureScript > project -- I added something along these lines in the ORG-NEWS > entry. > > If you want to contribute further, you'd need to sign the FSF > papers: https://orgmode.org/request-assign-future.txt > > Thanks! - -- [ 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----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5GLv4UHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsMkfAf/fFCfp91u8ZtK9VyVjlpf+tZ0wZzU 7d0OPcbnEtUZH/FkGyG2eFgXN/WBnf8O31ESj5EyXtnDGNZSa3Ia/cgmC7ZtCJRp 9w7YbwPnfM9EBq5qK7R+9i6fCEcua5i4Oszx4x1erWuksfGogCdKN6gwZJMYlH5y lqdGQ0LCZMnTxDHn4mi8JuM2K0kaaIK4oJMJmCLu8+/X6lvTbLjGsTl08dew0Pbx jMEkV/3FvtFNeS7MZIIrZedPgAhiS3o6IUj+hmngVpKdcabOZmBkV5IFgvMB77Us SuSKs3Y9Y4hlWZyBMV2Twc4lKicnO31vGJm9MmFn4LCjI3Fd5O6LFEnL0A== =GDMy -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-14 5:24 ` stardiviner @ 2020-02-14 10:02 ` Bastien 2020-02-14 15:15 ` stardiviner 0 siblings, 1 reply; 33+ messages in thread From: Bastien @ 2020-02-14 10:02 UTC (permalink / raw) To: stardiviner; +Cc: roberthambrock, emacs-orgmode Hi Stardiviner, stardiviner <numbchild@gmail.com> writes: > About this patch, last night, I try to test ob-clojurescript eval with CIDER > connection. But no luck, the ClojureScript REPL connection always failed to > start. I have problem on CIDER. So I have a request that can you take a test. > Because on my side, ~(cider-current-connection "cljs")~ returns ~nil~ unable to > test. I was able to execute #+begin_src clojurescript source blocks only when the containing Org file is itself within a project where cider knows how to launch a clojurescript nrepl. This is what I tried to convey in the ORG-NEWS entry: You can now use =#+begin_src clojurescript= and execute ClojureScript code from Org files. You will need to put the file in an directory from where ClojureScript knows how to start a nrepl connection: e.g. you can put your Org file at the root of a figwheel-main directory. > I think this patch should work. Just for confirm. There was no patch attached to your email, can you resend it? Thanks, -- Bastien ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-14 10:02 ` Bastien @ 2020-02-14 15:15 ` stardiviner 2020-02-14 20:40 ` Bastien 0 siblings, 1 reply; 33+ messages in thread From: stardiviner @ 2020-02-14 15:15 UTC (permalink / raw) To: Bastien; +Cc: roberthambrock, emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Bastien <bzg@gnu.org> writes: > Hi Stardiviner, > > stardiviner <numbchild@gmail.com> writes: > >> About this patch, last night, I try to test ob-clojurescript eval with CIDER >> connection. But no luck, the ClojureScript REPL connection always failed to >> start. I have problem on CIDER. So I have a request that can you take a test. >> Because on my side, ~(cider-current-connection "cljs")~ returns ~nil~ unable to >> test. > > I was able to execute #+begin_src clojurescript source blocks only > when the containing Org file is itself within a project where cider > knows how to launch a clojurescript nrepl. This is what I tried to > convey in the ORG-NEWS entry: > > You can now use =#+begin_src clojurescript= and execute > ClojureScript code from Org files. You will need to put the file in > an directory from where ClojureScript knows how to start a nrepl > connection: e.g. you can put your Org file at the root of a > figwheel-main directory. I use CIDER (sesman) keybinding =[C-c C-s d]= on ob-clojure src block to link current buffer directory to CIDER REPL session. I guess this should work for ClojureScript src block too. > > There was no patch attached to your email, can you resend it? > You already applied patches. I already checked latest master of Org Mode source code. - -- [ 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----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5GuZEUHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsNd9wf7BNRVjn52wjYJtO+FEZXXfoWFuhZg qCYqd6LhWL8tC3/aLEYmomWD0nLyz4QzOsxD9hliRRl1KNc+JYTRU9b5Si901l23 FPQQdGWxX6LqdRPx9TUg4IToo1AM1qNfRnZXq4lDvpDgO/NxWldeF14681RkgM16 W3OLa5FnW3eHxsLrFf7OIbxKyQRlT8W+GSx7GTaQgbZanKB8Z16mIZ9GYAl97VA9 nbUNg6SjddWmzwoDihAl3f+LLSKjtdTN+jeSeL2RNr/w/1dm6rjpCJKvCxTTmbV8 ruo6AAfvtP1msKvwGHpyoO9MhmqWMIAg+U+HVjk09baZVx2dxLox/YVrbg== =cFe+ -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-14 15:15 ` stardiviner @ 2020-02-14 20:40 ` Bastien 2020-02-15 0:42 ` Tim Cross 2020-02-18 13:01 ` [PATCH] Re: ob-clojure.el: Add ClojureScript interface stardiviner 0 siblings, 2 replies; 33+ messages in thread From: Bastien @ 2020-02-14 20:40 UTC (permalink / raw) To: stardiviner; +Cc: roberthambrock, emacs-orgmode stardiviner <numbchild@gmail.com> writes: > I use CIDER (sesman) keybinding =[C-c C-s d]= on ob-clojure src > block to link current buffer directory to CIDER REPL session. I simply start Cider with C-c M-j and then execute the Clojure source block with C-c C-c, it works fine. > I guess this should work for ClojureScript src block too. IMHO it works differently for ClojureScript, as C-c M-J doesn't know how to start a ClojureScript session unless you're in a directory with the proper cljs configuration (be it figwheel-main.edn, dev.cljs.edn, whatever.) At least this is how I made it work. -- Bastien ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-14 20:40 ` Bastien @ 2020-02-15 0:42 ` Tim Cross 2020-02-16 23:17 ` Bastien 2020-02-18 13:01 ` [PATCH] Re: ob-clojure.el: Add ClojureScript interface stardiviner 1 sibling, 1 reply; 33+ messages in thread From: Tim Cross @ 2020-02-15 0:42 UTC (permalink / raw) To: emacs-orgmode I wonder if it would make sense to use shadow-cljs rather than cider as a back end for evaluating clojurescript? More generally, I wonder if there would be any benefit in considering a Clojure CLI Tools back end integration and bypassing CIDER altogether? While I love CIDER, I'm not sure it is the right tool for a org-babel type environment. I've recently been moving my projects from being lein based to Clojure CLI tools based and while I still use CIDER for larger development work, find the CLI great for basic execution of code. For me, CIDER has a lot of additional overhead and complexity which is often of little benefit to what I want via babel and I've found it to be a very fragile environment. Sean Corfield has a great example deps.edn file at https://github.com/seancorfield/doc-clojure and it shows how you can hook in various different REPLs - for example, a basic socket based REPL, which might provide a cleaner and more stable back end interface for evaluating Clojure (and potentially clojurescript) for babel. My rough and immature idea would be to have a back end that allowed you to specify CLI aliases in the block header. These aliases can do a lot, including select whatever execution environment you want the code to run in. The back end could have default aliases for basic evaluation and it could all be based around a socket REPL, which should make sending/reading from the REPL fairly straight-forward. As I said, this is an initial and immature idea, but I think it could provide a back end which was a little more like other babel back ends and may be less fragile than one based on CIDER (plus I suspect it would be faster). What do people think? Is this something worth investigating further? Bastien <bzg@gnu.org> writes: > stardiviner <numbchild@gmail.com> writes: > >> I use CIDER (sesman) keybinding =[C-c C-s d]= on ob-clojure src >> block to link current buffer directory to CIDER REPL session. > > I simply start Cider with C-c M-j and then execute the Clojure source > block with C-c C-c, it works fine. > >> I guess this should work for ClojureScript src block too. > > IMHO it works differently for ClojureScript, as C-c M-J doesn't know > how to start a ClojureScript session unless you're in a directory with > the proper cljs configuration (be it figwheel-main.edn, dev.cljs.edn, > whatever.) At least this is how I made it work. -- Tim Cross ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-15 0:42 ` Tim Cross @ 2020-02-16 23:17 ` Bastien 2020-02-16 23:33 ` Tim Cross 2020-04-28 9:29 ` [BUG] ob-clojure.el new backend 'inf-clojure not compatible with latest version inf-clojure stardiviner 0 siblings, 2 replies; 33+ messages in thread From: Bastien @ 2020-02-16 23:17 UTC (permalink / raw) To: Tim Cross; +Cc: emacs-orgmode Hi Tim, thanks for your email. Tim Cross <theophilusx@gmail.com> writes: > I wonder if it would make sense to use shadow-cljs rather than cider as > a back end for evaluating clojurescript? I am inclined to question the usefulness of evaluating ClojureScript code *at all*. > More generally, I wonder if there would be any benefit in considering a > Clojure CLI Tools back end integration and bypassing CIDER altogether? Yes, I agree this would be better. I implemented (in master now) the support of inf-clojure.el to evaluate Clojure blocks. Inf-clojure is more lightweight than cider. Also, with (setq org-babel-clojure-backend 'inf-clojure) you can now add a :alias header arg to the src block and "clojure -Aalias" will then be called to launch the repl. > While I love CIDER, I'm not sure it is the right tool for a org-babel > type environment. I've recently been moving my projects from being lein > based to Clojure CLI tools based and while I still use CIDER for larger > development work, find the CLI great for basic execution of code. For > me, CIDER has a lot of additional overhead and complexity which is often > of little benefit to what I want via babel and I've found it to be a > very fragile environment. Yep, I agree again. > Sean Corfield has a great example deps.edn file at > https://github.com/seancorfield/doc-clojure and it shows how you can > hook in various different REPLs - for example, a basic socket based > REPL, which might provide a cleaner and more stable back end interface > for evaluating Clojure (and potentially clojurescript) for babel. I am not sure it is worth getting rid of inf-clojure.el altogether, but relying on tools.deps seems the way to go. > As I said, this is an initial and immature idea, but I think it could > provide a back end which was a little more like other babel back ends > and may be less fragile than one based on CIDER (plus I suspect it would > be faster). What do people think? Is this something worth investigating > further? Definitely! Thanks for sharing these idea. Please try the latest ob-clojure.el from master and let me know what can be improved to better fit your (and others') needs. Thanks, -- Bastien ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 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 1 sibling, 1 reply; 33+ messages in thread From: Tim Cross @ 2020-02-16 23:33 UTC (permalink / raw) To: Bastien; +Cc: emacs-orgmode Thanks for the response and work Bastien. I will check out the updated version when I get a chance. One point possibly relevant with regards to Clojurescript. I suspect there could be a reasonable use case when you consider clojurescipt in the context of node rather than just as a browser language. In particular, people have been using clojurescript to develop NPM packages that can be used in various ways for javascript projects. However, the right tool for doing this is likely shadow-cljs rather than clojure CLI tools - though it should also be possible just using the CLI tools. Tim Bastien <bzg@gnu.org> writes: > Hi Tim, > > thanks for your email. > > Tim Cross <theophilusx@gmail.com> writes: > >> I wonder if it would make sense to use shadow-cljs rather than cider as >> a back end for evaluating clojurescript? > > I am inclined to question the usefulness of evaluating ClojureScript > code *at all*. > >> More generally, I wonder if there would be any benefit in considering a >> Clojure CLI Tools back end integration and bypassing CIDER altogether? > > Yes, I agree this would be better. > > I implemented (in master now) the support of inf-clojure.el to > evaluate Clojure blocks. > > Inf-clojure is more lightweight than cider. > > Also, with (setq org-babel-clojure-backend 'inf-clojure) you can now > add a :alias header arg to the src block and "clojure -Aalias" will > then be called to launch the repl. > >> While I love CIDER, I'm not sure it is the right tool for a org-babel >> type environment. I've recently been moving my projects from being lein >> based to Clojure CLI tools based and while I still use CIDER for larger >> development work, find the CLI great for basic execution of code. For >> me, CIDER has a lot of additional overhead and complexity which is often >> of little benefit to what I want via babel and I've found it to be a >> very fragile environment. > > Yep, I agree again. > >> Sean Corfield has a great example deps.edn file at >> https://github.com/seancorfield/doc-clojure and it shows how you can >> hook in various different REPLs - for example, a basic socket based >> REPL, which might provide a cleaner and more stable back end interface >> for evaluating Clojure (and potentially clojurescript) for babel. > > I am not sure it is worth getting rid of inf-clojure.el altogether, > but relying on tools.deps seems the way to go. > >> As I said, this is an initial and immature idea, but I think it could >> provide a back end which was a little more like other babel back ends >> and may be less fragile than one based on CIDER (plus I suspect it would >> be faster). What do people think? Is this something worth investigating >> further? > > Definitely! Thanks for sharing these idea. > > Please try the latest ob-clojure.el from master and let me know what > can be improved to better fit your (and others') needs. > > Thanks, -- Tim Cross ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-16 23:33 ` Tim Cross @ 2020-02-16 23:51 ` Bastien 0 siblings, 0 replies; 33+ messages in thread From: Bastien @ 2020-02-16 23:51 UTC (permalink / raw) To: Tim Cross; +Cc: emacs-orgmode Tim Cross <theophilusx@gmail.com> writes: > Thanks for the response and work Bastien. I will check out the updated > version when I get a chance. Thanks. > One point possibly relevant with regards to Clojurescript. I suspect > there could be a reasonable use case when you consider clojurescipt in > the context of node rather than just as a browser language. In > particular, people have been using clojurescript to develop NPM packages > that can be used in various ways for javascript projects. However, the > right tool for doing this is likely shadow-cljs rather than clojure CLI > tools - though it should also be possible just using the CLI tools. Yes, I understand the need. But the Clojure ecosystem is so rich in tools that we need to get direct contributions from people using those tools *and* Org babel. Or at least make tests on how it could work. I hope volunteers can help! Cheers, -- Bastien ^ permalink raw reply [flat|nested] 33+ messages in thread
* [BUG] ob-clojure.el new backend 'inf-clojure not compatible with latest version inf-clojure 2020-02-16 23:17 ` Bastien 2020-02-16 23:33 ` Tim Cross @ 2020-04-28 9:29 ` stardiviner 2020-05-22 15:12 ` Bastien 1 sibling, 1 reply; 33+ messages in thread From: stardiviner @ 2020-04-28 9:29 UTC (permalink / raw) To: Bastien; +Cc: Tim Cross, emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Bastien <bzg@gnu.org> writes: > Hi Tim, > > thanks for your email. > > Tim Cross <theophilusx@gmail.com> writes: > >> I wonder if it would make sense to use shadow-cljs rather than cider as >> a back end for evaluating clojurescript? > > I am inclined to question the usefulness of evaluating ClojureScript > code *at all*. > >> More generally, I wonder if there would be any benefit in considering a >> Clojure CLI Tools back end integration and bypassing CIDER altogether? > > Yes, I agree this would be better. > > I implemented (in master now) the support of inf-clojure.el to > evaluate Clojure blocks. I try to use 'inf-clojure babel eval backend. But I got error: #+begin_example Debugger entered--Lisp error: (void-function inf-clojure-cmd) (inf-clojure-cmd (inf-clojure-project-type)) (let* ((alias (cdr (assq :alias params))) (cmd0 (inf-clojure-cmd (inf-clojure-project-type))) (cmd (if alias (replace-regexp-in-string "clojure" (format "clojure -A%s" alias) cmd0) cmd0))) (setq comint-prompt-regexp inf-clojure-comint-prompt-regexp) (funcall-interactively #'inf-clojure cmd) (goto-char (point-max))) (progn (let* ((alias (cdr (assq :alias params))) (cmd0 (inf-clojure-cmd (inf-clojure-project-type))) (cmd (if alias (replace-regexp-in-string "clojure" (format "clojure -A%s" alias) cmd0) cmd0))) (setq comint-prompt-regexp inf-clojure-comint-prompt-regexp) (funcall-interactively #'inf-clojure cmd) (goto-char (point-max)))) (unwind-protect (progn (let* ((alias (cdr (assq :alias params))) (cmd0 (inf-clojure-cmd (inf-clojure-project-type))) (cmd (if alias (replace-regexp-in-string "clojure" (format "clojure -A%s" alias) cmd0) cmd0))) (setq comint-prompt-regexp inf-clojure-comint-prompt-regexp) (funcall-interactively #'inf-clojure cmd) (goto-char (point-max)))) (set-window-configuration wconfig)) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (let* ((alias (cdr (assq :alias params))) (cmd0 (inf-clojure-cmd (inf-clojure-project-type))) (cmd (if alias (replace-regexp-in-string "clojure" ... cmd0) cmd0))) (setq comint-prompt-regexp inf-clojure-comint-prompt-regexp) (funcall-interactively #'inf-clojure cmd) (goto-char (point-max)))) (set-window-configuration wconfig))) (if (and inf-clojure-buffer (buffer-live-p (get-buffer inf-clojure-buffer))) nil (let ((wconfig (current-window-configuration))) (unwind-protect (progn (let* ((alias (cdr ...)) (cmd0 (inf-clojure-cmd ...)) (cmd (if alias ... cmd0))) (setq comint-prompt-regexp inf-clojure-comint-prompt-regexp) (funcall-interactively #'inf-clojure cmd) (goto-char (point-max)))) (set-window-configuration wconfig))) (sit-for 1)) ob-clojure-eval-with-inf-clojure("(print \"hello, world\")" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "") (:session . "none") (:hlines . "no") (:tangle . "no") (:cache . "yes") (:mkdirp . "yes") (:show-process . "no") (:noweb . "yes") (:eval . "yes"))) (cond ((eq org-babel-clojure-backend 'inf-clojure) (ob-clojure-eval-with-inf-clojure expanded params)) ((eq org-babel-clojure-backend 'cider) (ob-clojure-eval-with-cider expanded params)) ((eq org-babel-clojure-backend 'slime) (ob-clojure-eval-with-slime expanded params))) (setq result (cond ((eq org-babel-clojure-backend 'inf-clojure) (ob-clojure-eval-with-inf-clojure expanded params)) ((eq org-babel-clojure-backend 'cider) (ob-clojure-eval-with-cider expanded params)) ((eq org-babel-clojure-backend 'slime) (ob-clojure-eval-with-slime expanded params)))) (let* ((expanded (org-babel-expand-body:clojure body params)) (result-params (cdr (assq :result-params params))) result) (setq result (cond ((eq org-babel-clojure-backend 'inf-clojure) (ob-clojure-eval-with-inf-clojure expanded params)) ((eq org-babel-clojure-backend 'cider) (ob-clojure-eval-with-cider expanded params)) ((eq org-babel-clojure-backend 'slime) (ob-clojure-eval-with-slime expanded params)))) (let ((--params result-params)) (if (member "none" --params) nil (if (or (member "scalar" --params) (member "verbatim" --params) (member "html" --params) (member "code" --params) (member "pp" --params) (member "file" --params) (and (or (member "output" --params) (member "raw" --params) (member "org" --params) (member "drawer" --params)) (not (member "table" --params)))) result (condition-case nil (org-babel-script-escape result) (error result)))))) org-babel-execute:clojure("(print \"hello, world\")" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "") (:session . "none") (:hlines . "no") (:tangle . "no") (:cache . "yes") (:mkdirp . "yes") (:show-process . "no") (:noweb . "yes") (:eval . "yes"))) funcall(org-babel-execute:clojure "(print \"hello, world\")" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "") (:session . "none") (:hlines . "no") (:tangle . "no") (:cache . "yes") (:mkdirp . "yes") (:show-process . "no") (:noweb . "yes") (:eval . "yes"))) (let ((r (funcall cmd body params))) (if (and (eq (cdr (assq :result-type params)) 'value) (or (member "vector" result-params) (member "table" result-params)) (not (listp r))) (list (list r)) r)) (setq result (let ((r (funcall cmd body params))) (if (and (eq (cdr (assq :result-type params)) 'value) (or (member "vector" result-params) (member "table" result-params)) (not (listp r))) (list (list r)) r))) (if (member "none" result-params) (progn (funcall cmd body params) (message "result silenced")) (setq result (let ((r (funcall cmd body params))) (if (and (eq (cdr (assq :result-type params)) 'value) (or (member "vector" result-params) (member "table" result-params)) (not (listp r))) (list (list r)) r))) (let ((file (and (member "file" result-params) (cdr (assq :file params))))) (if file (progn (if (and result (not (or ... ...))) (progn (let (... ...) (unwind-protect ... ...)))) (setq result file))) (let ((post (cdr (assq :post params)))) (if post (progn (let ((*this* ...)) (setq result (org-babel-ref-resolve post)) (if file (progn ...)))))) (org-babel-insert-result result result-params info new-hash lang))) (let* ((lang (nth 0 info)) (result-params (cdr (assq :result-params params))) (body (let ((coderef (nth 6 info)) (expand (if (org-babel-noweb-p params :eval) (org-babel-expand-noweb-references info) (nth 1 info)))) (if (not coderef) expand (replace-regexp-in-string (org-src-coderef-regexp coderef) "" expand nil nil 1)))) (dir (cdr (assq :dir params))) (mkdirp (cdr (assq :mkdirp params))) (default-directory (cond ((not dir) default-directory) ((member mkdirp '("no" "nil" nil)) (file-name-as-directory (expand-file-name dir))) (t (let ((d ...)) (make-directory d 'parents) d)))) (cmd (intern (concat "org-babel-execute:" lang))) result) (if (fboundp cmd) nil (error "No org-babel-execute function for %s!" lang)) (message "executing %s code block%s..." (capitalize lang) (let ((name (nth 4 info))) (if name (format " (%s)" name) ""))) (if (member "none" result-params) (progn (funcall cmd body params) (message "result silenced")) (setq result (let ((r (funcall cmd body params))) (if (and (eq (cdr ...) 'value) (or (member "vector" result-params) (member "table" result-params)) (not (listp r))) (list (list r)) r))) (let ((file (and (member "file" result-params) (cdr (assq :file params))))) (if file (progn (if (and result (not ...)) (progn (let ... ...))) (setq result file))) (let ((post (cdr (assq :post params)))) (if post (progn (let (...) (setq result ...) (if file ...))))) (org-babel-insert-result result result-params info new-hash lang))) (run-hooks 'org-babel-after-execute-hook) result) (cond (current-cache (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (forward-line) (skip-chars-forward " \11") (let ((result (org-babel-read-result))) (message (replace-regexp-in-string "%" "%%" (format "%S" result))) result))) ((org-babel-confirm-evaluate info) (let* ((lang (nth 0 info)) (result-params (cdr (assq :result-params params))) (body (let ((coderef ...) (expand ...)) (if (not coderef) expand (replace-regexp-in-string ... "" expand nil nil 1)))) (dir (cdr (assq :dir params))) (mkdirp (cdr (assq :mkdirp params))) (default-directory (cond ((not dir) default-directory) ((member mkdirp ...) (file-name-as-directory ...)) (t (let ... ... d)))) (cmd (intern (concat "org-babel-execute:" lang))) result) (if (fboundp cmd) nil (error "No org-babel-execute function for %s!" lang)) (message "executing %s code block%s..." (capitalize lang) (let ((name (nth 4 info))) (if name (format " (%s)" name) ""))) (if (member "none" result-params) (progn (funcall cmd body params) (message "result silenced")) (setq result (let ((r ...)) (if (and ... ... ...) (list ...) r))) (let ((file (and ... ...))) (if file (progn (if ... ...) (setq result file))) (let ((post ...)) (if post (progn ...))) (org-babel-insert-result result result-params info new-hash lang))) (run-hooks 'org-babel-after-execute-hook) result))) (let* ((params (nth 2 info)) (cache (let ((c (cdr (assq :cache params)))) (and (not arg) c (string= "yes" c)))) (new-hash (and cache (org-babel-sha1-hash info :eval))) (old-hash (and cache (org-babel-current-result-hash))) (current-cache (and new-hash (equal new-hash old-hash)))) (cond (current-cache (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (forward-line) (skip-chars-forward " \11") (let ((result (org-babel-read-result))) (message (replace-regexp-in-string "%" "%%" (format "%S" result))) result))) ((org-babel-confirm-evaluate info) (let* ((lang (nth 0 info)) (result-params (cdr (assq :result-params params))) (body (let (... ...) (if ... expand ...))) (dir (cdr (assq :dir params))) (mkdirp (cdr (assq :mkdirp params))) (default-directory (cond (... default-directory) (... ...) (t ...))) (cmd (intern (concat "org-babel-execute:" lang))) result) (if (fboundp cmd) nil (error "No org-babel-execute function for %s!" lang)) (message "executing %s code block%s..." (capitalize lang) (let ((name ...)) (if name (format " (%s)" name) ""))) (if (member "none" result-params) (progn (funcall cmd body params) (message "result silenced")) (setq result (let (...) (if ... ... r))) (let ((file ...)) (if file (progn ... ...)) (let (...) (if post ...)) (org-babel-insert-result result result-params info new-hash lang))) (run-hooks 'org-babel-after-execute-hook) result)))) (progn (let* ((c (nthcdr 2 info))) (setcar c (org-babel-process-params (car c)))) (let* ((params (nth 2 info)) (cache (let ((c (cdr ...))) (and (not arg) c (string= "yes" c)))) (new-hash (and cache (org-babel-sha1-hash info :eval))) (old-hash (and cache (org-babel-current-result-hash))) (current-cache (and new-hash (equal new-hash old-hash)))) (cond (current-cache (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (forward-line) (skip-chars-forward " \11") (let ((result ...)) (message (replace-regexp-in-string "%" "%%" ...)) result))) ((org-babel-confirm-evaluate info) (let* ((lang (nth 0 info)) (result-params (cdr ...)) (body (let ... ...)) (dir (cdr ...)) (mkdirp (cdr ...)) (default-directory (cond ... ... ...)) (cmd (intern ...)) result) (if (fboundp cmd) nil (error "No org-babel-execute function for %s!" lang)) (message "executing %s code block%s..." (capitalize lang) (let (...) (if name ... ""))) (if (member "none" result-params) (progn (funcall cmd body params) (message "result silenced")) (setq result (let ... ...)) (let (...) (if file ...) (let ... ...) (org-babel-insert-result result result-params info new-hash lang))) (run-hooks 'org-babel-after-execute-hook) result))))) (if (org-babel-check-evaluate info) (progn (let* ((c (nthcdr 2 info))) (setcar c (org-babel-process-params (car c)))) (let* ((params (nth 2 info)) (cache (let ((c ...)) (and (not arg) c (string= "yes" c)))) (new-hash (and cache (org-babel-sha1-hash info :eval))) (old-hash (and cache (org-babel-current-result-hash))) (current-cache (and new-hash (equal new-hash old-hash)))) (cond (current-cache (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (forward-line) (skip-chars-forward " \11") (let (...) (message ...) result))) ((org-babel-confirm-evaluate info) (let* ((lang ...) (result-params ...) (body ...) (dir ...) (mkdirp ...) (default-directory ...) (cmd ...) result) (if (fboundp cmd) nil (error "No org-babel-execute function for %s!" lang)) (message "executing %s code block%s..." (capitalize lang) (let ... ...)) (if (member "none" result-params) (progn ... ...) (setq result ...) (let ... ... ... ...)) (run-hooks 'org-babel-after-execute-hook) result)))))) (let* ((org-babel-current-src-block-location (or org-babel-current-src-block-location (nth 5 info) (org-babel-where-is-src-block-head))) (info (if info (copy-tree info) (org-babel-get-src-block-info)))) (let* ((c (nthcdr 2 info))) (setcar c (org-babel-merge-params (car c) params))) (if (org-babel-check-evaluate info) (progn (let* ((c (nthcdr 2 info))) (setcar c (org-babel-process-params (car c)))) (let* ((params (nth 2 info)) (cache (let (...) (and ... c ...))) (new-hash (and cache (org-babel-sha1-hash info :eval))) (old-hash (and cache (org-babel-current-result-hash))) (current-cache (and new-hash (equal new-hash old-hash)))) (cond (current-cache (save-excursion (goto-char ...) (forward-line) (skip-chars-forward " \11") (let ... ... result))) ((org-babel-confirm-evaluate info) (let* (... ... ... ... ... ... ... result) (if ... nil ...) (message "executing %s code block%s..." ... ...) (if ... ... ... ...) (run-hooks ...) result))))))) (closure (*this* org-babel-confirm-evaluate-answer-no org-babel-tangle-uncomment-comments org-src-preserve-indentation org-src-lang-modes org-edit-src-content-indentation org-babel-library-of-babel t) (&optional arg info params) "Execute the current source code block.\nInsert the ..." (interactive) (let* ((org-babel-current-src-block-location (or org-babel-current-src-block-location (nth 5 info) (org-babel-where-is-src-block-head))) (info (if info (copy-tree info) (org-babel-get-src-block-info)))) (let* ((c (nthcdr 2 info))) (setcar c (org-babel-merge-params (car c) params))) (if (org-babel-check-evaluate info) (progn (let* ((c ...)) (setcar c (org-babel-process-params ...))) (let* ((params ...) (cache ...) (new-hash ...) (old-hash ...) (current-cache ...)) (cond (current-cache ...) (... ...)))))))(nil ("clojure" "(print \"hello, world\")" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "") (:eval . "yes") (:noweb . "yes") (:show-process . "no") (:mkdirp . "yes") (:cache . "yes") (:tangle . "no") (:hlines . "no") (:session . "none")) "" nil 552720 "(ref:%s)") nil) apply((closure (*this* org-babel-confirm-evaluate-answer-no org-babel-tangle-uncomment-comments org-src-preserve-indentation org-src-lang-modes org-edit-src-content-indentation org-babel-library-of-babel t) (&optional arg info params) "Execute the current source code block.\nInsert the ..." (interactive) (let* ((org-babel-current-src-block-location (or org-babel-current-src-block-location (nth 5 info) (org-babel-where-is-src-block-head))) (info (if info (copy-tree info) (org-babel-get-src-block-info)))) (let* ((c (nthcdr 2 info))) (setcar c (org-babel-merge-params (car c) params))) (if (org-babel-check-evaluate info) (progn (let* ((c ...)) (setcar c (org-babel-process-params ...))) (let* ((params ...) (cache ...) (new-hash ...) (old-hash ...) (current-cache ...)) (cond (current-cache ...) (... ...))))))) (nil ("clojure" "(print \"hello, world\")" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "") (:eval . "yes") (:noweb . "yes") (:show-process . "no") (:mkdirp . "yes") (:cache . "yes") (:tangle . "no") (:hlines . "no") (:session . "none")) "" nil 552720 "(ref:%s)") nil)) #f(advice-wrapper :after (closure (*this* org-babel-confirm-evaluate-answer-no org-babel-tangle-uncomment-comments org-src-preserve-indentation org-src-lang-modes org-edit-src-content-indentation org-babel-library-of-babel t) (&optional arg info params) "Execute the current source code block.\nInsert the results of execution into the buffer. Source code\nexecution and the collection and formatting of results can be\ncontrolled through a variety of header arguments.\n\nWith prefix argument ARG, force re-execution even if an existing\nresult cached in the buffer would otherwise have been returned.\n\nOptionally supply a value for INFO in the form returned by\n`org-babel-get-src-block-info'.\n\nOptionally supply a value for PARAMS which will be merged with\nthe header arguments specified at the front of the source code\nblock." (interactive) (let* ((org-babel-current-src-block-location (or org-babel-current-src-block-location (nth 5 info) (org-babel-where-is-src-block-head))) (info (if info (copy-tree info) (org-babel-get-src-block-info)))) (let* ((c (nthcdr 2 info))) (setcar c (org-babel-merge-params (car c) params))) (if (org-babel-check-evaluate info) (progn (let* ((c (nthcdr 2 info))) (setcar c (org-babel-process-params (car c)))) (let* ((params (nth 2 info)) (cache (let ((c (cdr (assq :cache params)))) (and (not arg) c (string= "yes" c)))) (new-hash (and cache (org-babel-sha1-hash info :eval))) (old-hash (and cache (org-babel-current-result-hash))) (current-cache (and new-hash (equal new-hash old-hash)))) (cond (current-cache (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (forward-line) (skip-chars-forward " \11") (let ((result (org-babel-read-result))) (message (replace-regexp-in-string "%" "%%" (format "%S" result))) result))) ((org-babel-confirm-evaluate info) (let* ((lang (nth 0 info)) (result-params (cdr (assq :result-params params))) (body (let ((coderef (nth 6 info)) (expand (if (org-babel-noweb-p params :eval) (org-babel-expand-noweb-references info) (nth 1 info)))) (if (not coderef) expand (replace-regexp-in-string (org-src-coderef-regexp coderef) "" expand nil nil 1)))) (dir (cdr (assq :dir params))) (mkdirp (cdr (assq :mkdirp params))) (default-directory (cond ((not dir) default-directory) ((member mkdirp '("no" "nil" nil)) (file-name-as-directory (expand-file-name dir))) (t (let ((d (file-name-as-directory (expand-file-name dir)))) (make-directory d 'parents) d)))) (cmd (intern (concat "org-babel-execute:" lang))) result) (if (fboundp cmd) nil (error "No org-babel-execute function for %s!" lang)) (message "executing %s code block%s..." (capitalize lang) (let ((name (nth 4 info))) (if name (format " (%s)" name) ""))) (if (member "none" result-params) (progn (funcall cmd body params) (message "result silenced")) (setq result (let ((r (funcall cmd body params))) (if (and (eq (cdr (assq :result-type params)) 'value) (or (member "vector" result-params) (member "table" result-params)) (not (listp r))) (list (list r)) r))) (let ((file (and (member "file" result-params) (cdr (assq :file params))))) (if file (progn (if (and result (not (or (member "link" result-params) (member "graphics" result-params)))) (progn (let ((temp-file file) (temp-buffer (generate-new-buffer " *temp file*"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert (org-babel-format-result result (cdr (assq :sep params))))) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (setq result file))) (let ((post (cdr (assq :post params)))) (if post (progn (let ((*this* (if (not file) result (org-babel-result-to-file file (let ((desc (assq :file-desc params))) (and desc (or (cdr desc) result))))))) (setq result (org-babel-ref-resolve post)) (if file (progn (setq result-params (remove "file" result-params)))))))) (org-babel-insert-result result result-params info new-hash lang))) (run-hooks 'org-babel-after-execute-hook) result)))))))) my/org-redisplay-inline-images)(nil ("clojure" "(print \"hello, world\")" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "") (:eval . "yes") (:noweb . "yes") (:show-process . "no") (:mkdirp . "yes") (:cache . "yes") (:tangle . "no") (:hlines . "no") (:session . "none")) "" nil 552720 "(ref:%s)") nil) ob-async-org-babel-execute-src-block(#f(advice-wrapper :after (closure (*this* org-babel-confirm-evaluate-answer-no org-babel-tangle-uncomment-comments org-src-preserve-indentation org-src-lang-modes org-edit-src-content-indentation org-babel-library-of-babel t) (&optional arg info params) "Execute the current source code block.\nInsert the ..." (interactive) (let* ((org-babel-current-src-block-location (or org-babel-current-src-block-location (nth 5 info) (org-babel-where-is-src-block-head))) (info (if info (copy-tree info) (org-babel-get-src-block-info)))) (let* ((c (nthcdr 2 info))) (setcar c (org-babel-merge-params (car c) params))) (if (org-babel-check-evaluate info) (progn (let* (...) (setcar c ...)) (let* (... ... ... ... ...) (cond ... ...)))))) my/org-redisplay-inline-images) nil ("clojure" "(print \"hello, world\")" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "") (:eval . "yes") (:noweb . "yes") (:show-process . "no") (:mkdirp . "yes") (:cache . "yes") (:tangle . "no") (:hlines . "no") (:session . "none")) "" nil 552720 "(ref:%s)")) apply(ob-async-org-babel-execute-src-block #f(advice-wrapper :after (closure (*this* org-babel-confirm-evaluate-answer-no org-babel-tangle-uncomment-comments org-src-preserve-indentation org-src-lang-modes org-edit-src-content-indentation org-babel-library-of-babel t) (&optional arg info params) "Execute the current source code block.\nInsert the ..." (interactive) (let* ((org-babel-current-src-block-location (or org-babel-current-src-block-location (nth 5 info) (org-babel-where-is-src-block-head))) (info (if info (copy-tree info) (org-babel-get-src-block-info)))) (let* ((c (nthcdr 2 info))) (setcar c (org-babel-merge-params (car c) params))) (if (org-babel-check-evaluate info) (progn (let* (...) (setcar c ...)) (let* (... ... ... ... ...) (cond ... ...)))))) my/org-redisplay-inline-images) (nil ("clojure" "(print \"hello, world\")" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "") (:eval . "yes") (:noweb . "yes") (:show-process . "no") (:mkdirp . "yes") (:cache . "yes") (:tangle . "no") (:hlines . "no") (:session . "none")) "" nil 552720 "(ref:%s)"))) org-babel-execute-src-block(nil ("clojure" "(print \"hello, world\")" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "") (:eval . "yes") (:noweb . "yes") (:show-process . "no") (:mkdirp . "yes") (:cache . "yes") (:tangle . "no") (:hlines . "no") (:session . "none")) "" nil 552720 "(ref:%s)")) (if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-eval-wipe-error-buffer) (org-babel-execute-src-block current-prefix-arg (org-babel-get-src-block-info nil context))) (cond ((memq type '(src-block inline-src-block)) (if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-eval-wipe-error-buffer) (org-babel-execute-src-block current-prefix-arg (org-babel-get-src-block-info nil context)))) ((org-match-line "[ \11]*$") (or (run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (user-error (substitute-command-keys "`\\[org-ctrl-c-ctrl-c]' can do nothing useful...")))) ((memq type '(inline-babel-call babel-call)) (let ((info (org-babel-lob-get-info context))) (if info (progn (org-babel-execute-src-block nil info))))) ((eq type 'clock) (org-clock-update-time-maybe)) ((eq type 'dynamic-block) (save-excursion (goto-char (org-element-property :post-affiliated context)) (org-update-dblock))) ((eq type 'footnote-definition) (goto-char (org-element-property :post-affiliated context)) (call-interactively 'org-footnote-action)) ((eq type 'footnote-reference) (call-interactively #'org-footnote-action)) ((memq type '(inlinetask headline)) (save-excursion (goto-char (org-element-property :begin context)) (call-interactively #'org-set-tags-command))) ((eq type 'item) (if (or radio-list-p (and (boundp org-list-checkbox-radio-mode) org-list-checkbox-radio-mode)) (org-toggle-radio-button arg) (let* ((box (org-element-property :checkbox context)) (struct (org-element-property :structure context)) (old-struct (copy-tree struct)) (parents (org-list-parents-alist struct)) (prevs (org-list-prevs-alist struct)) (orderedp (org-not-nil ...))) (org-list-set-checkbox (org-element-property :begin context) struct (cond (... "[-]") (... "[ ]") (... nil) (... "[ ]") (t "[X]"))) (org-list-struct-fix-ind struct parents 2) (org-list-struct-fix-item-end struct) (org-list-struct-fix-bul struct prevs) (org-list-struct-fix-ind struct parents) (let ((block-item ...)) (if (and box ...) (if ... ... ...) (org-list-struct-apply-struct struct old-struct) (org-update-checkbox-count-maybe)) (if block-item (progn ...)))))) ((eq type 'plain-list) (if (or radio-list-p (and (boundp org-list-checkbox-radio-mode) org-list-checkbox-radio-mode)) (org-toggle-radio-button arg) (let* ((begin (org-element-property :contents-begin context)) (struct (org-element-property :structure context)) (old-struct (copy-tree struct)) (first-box (save-excursion ... ... ...)) (new-box (cond ... ... ... ...))) (cond (arg (let ... ...)) ((and first-box ...) (org-list-set-checkbox begin struct new-box))) (if (equal (org-list-write-struct struct ... old-struct) old-struct) (progn (message "Cannot update this checkbox"))) (org-update-checkbox-count-maybe)))) ((eq type 'keyword) (let ((org-inhibit-startup-visibility-stuff t) (org-startup-align-all-tables nil)) (if (boundp 'org-table-coordinate-overlays) (progn (mapc #'delete-overlay org-table-coordinate-overlays) (setq org-table-coordinate-overlays nil))) (let* ((--invisible-types '...) (--markers\? 'use-markers) (--data (mapcar ... ...))) (unwind-protect (progn (org-mode-restart)) (save-excursion (save-restriction ... ... ...))))) (message "Local setup has been refreshed")) ((memq type '(node-property property-drawer)) (call-interactively #'org-property-action)) ((eq type 'radio-target) (call-interactively #'org-update-radio-target-regexp)) ((eq type 'statistics-cookie) (call-interactively #'org-update-statistics-cookies)) ((memq type '(table-row table-cell table)) (if (eq (org-element-property :type context) 'table\.el) (message "%s" (substitute-command-keys "\\<org-mode-map>Use `\\[org-edit-special]' to ...")) (if (or (eq type 'table) (and (eq type ...) (= ... ...))) (save-excursion (if (org-at-TBLFM-p) (progn ... ...) (goto-char ...) (org-call-with-arg ... ...) (orgtbl-send-table ...))) (org-table-maybe-eval-formula) (cond (arg (call-interactively ...)) ((org-table-maybe-recalculate-line)) (t (org-table-align)))))) ((eq type 'timestamp) (funcall pcase-0)) ((eq type 'planning) (cond ((org-at-timestamp-p 'lax) (funcall pcase-0)) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) nil) (t (user-error (substitute-command-keys "`\\[org-ctrl-c-ctrl-c]' can do nothing useful..."))))) ((null type) (cond ((org-at-heading-p) (call-interactively #'org-set-tags-command)) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (funcall pcase-1)) (t (funcall pcase-2)))) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (funcall pcase-1)) (t (funcall pcase-2))) (let* ((pcase-2 #'(lambda nil (user-error (substitute-command-keys "`\\[org-ctrl-c-ctrl-c]' can do nothing useful here")))) (pcase-1 #'(lambda nil)) (pcase-0 #'(lambda nil (org-timestamp-change 0 'day)))) (cond ((memq type '(src-block inline-src-block)) (if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-eval-wipe-error-buffer) (org-babel-execute-src-block current-prefix-arg (org-babel-get-src-block-info nil context)))) ((org-match-line "[ \11]*$") (or (run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (user-error (substitute-command-keys "`\\[org-ctrl-c-ctrl-c]' can do nothing useful here")))) ((memq type '(inline-babel-call babel-call)) (let ((info (org-babel-lob-get-info context))) (if info (progn (org-babel-execute-src-block nil info))))) ((eq type 'clock) (org-clock-update-time-maybe)) ((eq type 'dynamic-block) (save-excursion (goto-char (org-element-property :post-affiliated context)) (org-update-dblock))) ((eq type 'footnote-definition) (goto-char (org-element-property :post-affiliated context)) (call-interactively 'org-footnote-action)) ((eq type 'footnote-reference) (call-interactively #'org-footnote-action)) ((memq type '(inlinetask headline)) (save-excursion (goto-char (org-element-property :begin context)) (call-interactively #'org-set-tags-command))) ((eq type 'item) (if (or radio-list-p (and (boundp org-list-checkbox-radio-mode) org-list-checkbox-radio-mode)) (org-toggle-radio-button arg) (let* ((box (org-element-property :checkbox context)) (struct (org-element-property :structure context)) (old-struct (copy-tree struct)) (parents (org-list-parents-alist struct)) (prevs (org-list-prevs-alist struct)) (orderedp (org-not-nil ...))) (org-list-set-checkbox (org-element-property :begin context) struct (cond (... "[-]") (... "[ ]") (... nil) (... "[ ]") (t "[X]"))) (org-list-struct-fix-ind struct parents 2) (org-list-struct-fix-item-end struct) (org-list-struct-fix-bul struct prevs) (org-list-struct-fix-ind struct parents) (let ((block-item ...)) (if (and box ...) (if ... ... ...) (org-list-struct-apply-struct struct old-struct) (org-update-checkbox-count-maybe)) (if block-item (progn ...)))))) ((eq type 'plain-list) (if (or radio-list-p (and (boundp org-list-checkbox-radio-mode) org-list-checkbox-radio-mode)) (org-toggle-radio-button arg) (let* ((begin (org-element-property :contents-begin context)) (struct (org-element-property :structure context)) (old-struct (copy-tree struct)) (first-box (save-excursion ... ... ...)) (new-box (cond ... ... ... ...))) (cond (arg (let ... ...)) ((and first-box ...) (org-list-set-checkbox begin struct new-box))) (if (equal (org-list-write-struct struct ... old-struct) old-struct) (progn (message "Cannot update this checkbox"))) (org-update-checkbox-count-maybe)))) ((eq type 'keyword) (let ((org-inhibit-startup-visibility-stuff t) (org-startup-align-all-tables nil)) (if (boundp 'org-table-coordinate-overlays) (progn (mapc #'delete-overlay org-table-coordinate-overlays) (setq org-table-coordinate-overlays nil))) (let* ((--invisible-types '...) (--markers\? 'use-markers) (--data (mapcar ... ...))) (unwind-protect (progn (org-mode-restart)) (save-excursion (save-restriction ... ... ...))))) (message "Local setup has been refreshed")) ((memq type '(node-property property-drawer)) (call-interactively #'org-property-action)) ((eq type 'radio-target) (call-interactively #'org-update-radio-target-regexp)) ((eq type 'statistics-cookie) (call-interactively #'org-update-statistics-cookies)) ((memq type '(table-row table-cell table)) (if (eq (org-element-property :type context) 'table\.el) (message "%s" (substitute-command-keys "\\<org-mode-map>Use `\\[org-edit-special]' to edit t...")) (if (or (eq type 'table) (and (eq type ...) (= ... ...))) (save-excursion (if (org-at-TBLFM-p) (progn ... ...) (goto-char ...) (org-call-with-arg ... ...) (orgtbl-send-table ...))) (org-table-maybe-eval-formula) (cond (arg (call-interactively ...)) ((org-table-maybe-recalculate-line)) (t (org-table-align)))))) ((eq type 'timestamp) (funcall pcase-0)) ((eq type 'planning) (cond ((org-at-timestamp-p 'lax) (funcall pcase-0)) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) nil) (t (user-error (substitute-command-keys "`\\[org-ctrl-c-ctrl-c]' can do nothing useful here"))))) ((null type) (cond ((org-at-heading-p) (call-interactively #'org-set-tags-command)) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (funcall pcase-1)) (t (funcall pcase-2)))) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (funcall pcase-1)) (t (funcall pcase-2)))) (let* ((context (org-element-lineage (org-element-context) '(babel-call clock dynamic-block footnote-definition footnote-reference inline-babel-call inline-src-block inlinetask item keyword node-property paragraph plain-list planning property-drawer radio-target src-block statistics-cookie table table-cell table-row timestamp) t)) (radio-list-p (org-at-radio-list-p)) (type (org-element-type context))) (if (eq type 'paragraph) (progn (let ((parent (org-element-property :parent context))) (if (and (eq (org-element-type parent) 'item) (= (line-beginning-position) (org-element-property :begin parent))) (progn (setq context parent) (setq type 'item)))))) (let* ((pcase-2 #'(lambda nil (user-error (substitute-command-keys "`\\[org-ctrl-c-ctrl-c]' can do nothing useful here")))) (pcase-1 #'(lambda nil)) (pcase-0 #'(lambda nil (org-timestamp-change 0 'day)))) (cond ((memq type '(src-block inline-src-block)) (if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-eval-wipe-error-buffer) (org-babel-execute-src-block current-prefix-arg (org-babel-get-src-block-info nil context)))) ((org-match-line "[ \11]*$") (or (run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (user-error (substitute-command-keys "`\\[org-ctrl-c-ctrl-c]' can do nothing useful here")))) ((memq type '(inline-babel-call babel-call)) (let ((info (org-babel-lob-get-info context))) (if info (progn (org-babel-execute-src-block nil info))))) ((eq type 'clock) (org-clock-update-time-maybe)) ((eq type 'dynamic-block) (save-excursion (goto-char (org-element-property :post-affiliated context)) (org-update-dblock))) ((eq type 'footnote-definition) (goto-char (org-element-property :post-affiliated context)) (call-interactively 'org-footnote-action)) ((eq type 'footnote-reference) (call-interactively #'org-footnote-action)) ((memq type '(inlinetask headline)) (save-excursion (goto-char (org-element-property :begin context)) (call-interactively #'org-set-tags-command))) ((eq type 'item) (if (or radio-list-p (and (boundp org-list-checkbox-radio-mode) org-list-checkbox-radio-mode)) (org-toggle-radio-button arg) (let* ((box ...) (struct ...) (old-struct ...) (parents ...) (prevs ...) (orderedp ...)) (org-list-set-checkbox (org-element-property :begin context) struct (cond ... ... ... ... ...)) (org-list-struct-fix-ind struct parents 2) (org-list-struct-fix-item-end struct) (org-list-struct-fix-bul struct prevs) (org-list-struct-fix-ind struct parents) (let (...) (if ... ... ... ...) (if block-item ...))))) ((eq type 'plain-list) (if (or radio-list-p (and (boundp org-list-checkbox-radio-mode) org-list-checkbox-radio-mode)) (org-toggle-radio-button arg) (let* ((begin ...) (struct ...) (old-struct ...) (first-box ...) (new-box ...)) (cond (arg ...) (... ...)) (if (equal ... old-struct) (progn ...)) (org-update-checkbox-count-maybe)))) ((eq type 'keyword) (let ((org-inhibit-startup-visibility-stuff t) (org-startup-align-all-tables nil)) (if (boundp 'org-table-coordinate-overlays) (progn (mapc ... org-table-coordinate-overlays) (setq org-table-coordinate-overlays nil))) (let* ((--invisible-types ...) (--markers\? ...) (--data ...)) (unwind-protect (progn ...) (save-excursion ...)))) (message "Local setup has been refreshed")) ((memq type '(node-property property-drawer)) (call-interactively #'org-property-action)) ((eq type 'radio-target) (call-interactively #'org-update-radio-target-regexp)) ((eq type 'statistics-cookie) (call-interactively #'org-update-statistics-cookies)) ((memq type '(table-row table-cell table)) (if (eq (org-element-property :type context) 'table\.el) (message "%s" (substitute-command-keys "\\<org-mode-map>Use `\\[org-edit-special]' to edit t...")) (if (or (eq type ...) (and ... ...)) (save-excursion (if ... ... ... ... ...)) (org-table-maybe-eval-formula) (cond (arg ...) (...) (t ...))))) ((eq type 'timestamp) (funcall pcase-0)) ((eq type 'planning) (cond ((org-at-timestamp-p 'lax) (funcall pcase-0)) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) nil) (t (user-error (substitute-command-keys "`\\[org-ctrl-c-ctrl-c]' can do nothing useful here"))))) ((null type) (cond ((org-at-heading-p) (call-interactively #'org-set-tags-command)) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (funcall pcase-1)) (t (funcall pcase-2)))) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (funcall pcase-1)) (t (funcall pcase-2))))) (cond ((and (boundp 'org-columns-overlays) org-columns-overlays) (org-columns-quit)) ((or (and (boundp 'org-clock-overlays) org-clock-overlays) org-occur-highlights) (if (boundp 'org-clock-overlays) (progn (org-clock-remove-overlays))) (org-remove-occur-highlights) (message "Temporary highlights/overlays removed from current...")) ((and (local-variable-p 'org-finish-function) (fboundp org-finish-function)) (funcall org-finish-function)) ((org-babel-hash-at-point)) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-hook)) (t (let* ((context (org-element-lineage (org-element-context) '(babel-call clock dynamic-block footnote-definition footnote-reference inline-babel-call inline-src-block inlinetask item keyword node-property paragraph plain-list planning property-drawer radio-target src-block statistics-cookie table table-cell table-row timestamp) t)) (radio-list-p (org-at-radio-list-p)) (type (org-element-type context))) (if (eq type 'paragraph) (progn (let ((parent ...)) (if (and ... ...) (progn ... ...))))) (let* ((pcase-2 #'(lambda nil ...)) (pcase-1 #'(lambda nil)) (pcase-0 #'(lambda nil ...))) (cond ((memq type '...) (if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-eval-wipe-error-buffer) (org-babel-execute-src-block current-prefix-arg ...))) ((org-match-line "[ \11]*$") (or (run-hook-with-args-until-success ...) (user-error ...))) ((memq type '...) (let (...) (if info ...))) ((eq type 'clock) (org-clock-update-time-maybe)) ((eq type 'dynamic-block) (save-excursion (goto-char ...) (org-update-dblock))) ((eq type 'footnote-definition) (goto-char (org-element-property :post-affiliated context)) (call-interactively 'org-footnote-action)) ((eq type 'footnote-reference) (call-interactively #'org-footnote-action)) ((memq type '...) (save-excursion (goto-char ...) (call-interactively ...))) ((eq type 'item) (if (or radio-list-p ...) (org-toggle-radio-button arg) (let* ... ... ... ... ... ... ...))) ((eq type 'plain-list) (if (or radio-list-p ...) (org-toggle-radio-button arg) (let* ... ... ... ...))) ((eq type 'keyword) (let (... ...) (if ... ...) (let* ... ...)) (message "Local setup has been refreshed")) ((memq type '...) (call-interactively #'org-property-action)) ((eq type 'radio-target) (call-interactively #'org-update-radio-target-regexp)) ((eq type 'statistics-cookie) (call-interactively #'org-update-statistics-cookies)) ((memq type '...) (if (eq ... ...) (message "%s" ...) (if ... ... ... ...))) ((eq type 'timestamp) (funcall pcase-0)) ((eq type 'planning) (cond (... ...) (... nil) (t ...))) ((null type) (cond (... ...) (... ...) (t ...))) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (funcall pcase-1)) (t (funcall pcase-2))))))) org-ctrl-c-ctrl-c(nil) funcall-interactively(org-ctrl-c-ctrl-c nil) call-interactively(org-ctrl-c-ctrl-c nil nil) command-execute(org-ctrl-c-ctrl-c) #+end_example Then I take a check, found that the latest version inf-clojure seems don't have ~inf-clojure-cmd~, ~inf-clojure-project-type~ functions. Am I wrong on searching? Comparing the new backend implement timestamp and inf-clojure commits history timestamp, Bastien will not add a function which is already remove. So I did Git log search, those functions are indeed remove. > > Inf-clojure is more lightweight than cider. > > Also, with (setq org-babel-clojure-backend 'inf-clojure) you can now > add a :alias header arg to the src block and "clojure -Aalias" will > then be called to launch the repl. > >> While I love CIDER, I'm not sure it is the right tool for a org-babel >> type environment. I've recently been moving my projects from being lein >> based to Clojure CLI tools based and while I still use CIDER for larger >> development work, find the CLI great for basic execution of code. For >> me, CIDER has a lot of additional overhead and complexity which is often >> of little benefit to what I want via babel and I've found it to be a >> very fragile environment. > > Yep, I agree again. > >> Sean Corfield has a great example deps.edn file at >> https://github.com/seancorfield/doc-clojure and it shows how you can >> hook in various different REPLs - for example, a basic socket based >> REPL, which might provide a cleaner and more stable back end interface >> for evaluating Clojure (and potentially clojurescript) for babel. > > I am not sure it is worth getting rid of inf-clojure.el altogether, > but relying on tools.deps seems the way to go. > >> As I said, this is an initial and immature idea, but I think it could >> provide a back end which was a little more like other babel back ends >> and may be less fragile than one based on CIDER (plus I suspect it would >> be faster). What do people think? Is this something worth investigating >> further? > > Definitely! Thanks for sharing these idea. > > Please try the latest ob-clojure.el from master and let me know what > can be improved to better fit your (and others') needs. > > Thanks, - -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 -----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6n95YUHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsNoqwf6Ap4NBd5DnbLgYgamIgD4QhSLwl9Y kMpAu/Drlixtu5+GOhkC49WfobavgxK9K0on+a+Jg3NTdeS4qRpmTq/E4YS2zF0D 74oHwADfuQ76ykv2klnvpQY4j0+3lyc9sfP/6e03ZpL91kUgRqEdGh80MbZd4u2J Y0vVAzTnLIf1IOVE3EX4kOTO9+WKG4xPFG3M9W13ZzkzWv/09Qjk39PQIns+ijqv 46sKLaswJRZ5X5yYKhE3/Z4KnOHoJFnEI5vtF0B4JU8dyn667WO1aG2zqbdKs+I1 89ZgjSOYrB7Op81YPUXQjFQ6eOVHImoxN83lrp3qZ+CEOf8pkvXOVU0low== =nieg -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [BUG] ob-clojure.el new backend 'inf-clojure not compatible with latest version inf-clojure 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 0 siblings, 0 replies; 33+ messages in thread From: Bastien @ 2020-05-22 15:12 UTC (permalink / raw) To: stardiviner; +Cc: Tim Cross, emacs-orgmode Hi, stardiviner <numbchild@gmail.com> writes: > I try to use 'inf-clojure babel eval backend. But I got error: Thanks for reporting this. I just had a look and inf-clojure changed in a way that makes it difficult for now to use it. I need to report a problem with `clojure-project-dir' first, which current throws an error when calling inf-clojure from an org file that is not part of a clojure project. I'll report when I make progress on this. -- Bastien ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-14 20:40 ` Bastien 2020-02-15 0:42 ` Tim Cross @ 2020-02-18 13:01 ` stardiviner 2020-02-18 13:15 ` Bastien 1 sibling, 1 reply; 33+ messages in thread From: stardiviner @ 2020-02-18 13:01 UTC (permalink / raw) To: Bastien; +Cc: roberthambrock, emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Bastien <bzg@gnu.org> writes: > stardiviner <numbchild@gmail.com> writes: > >> I use CIDER (sesman) keybinding =[C-c C-s d]= on ob-clojure src >> block to link current buffer directory to CIDER REPL session. > > I simply start Cider with C-c M-j and then execute the Clojure source > block with C-c C-c, it works fine. I tested your method, true. And I also pulled that latest ob-clojure.el changes. Works great, I like this new method more. Thanks for your improvement. > >> I guess this should work for ClojureScript src block too. > > IMHO it works differently for ClojureScript, as C-c M-J doesn't know > how to start a ClojureScript session unless you're in a directory with > the proper cljs configuration (be it figwheel-main.edn, dev.cljs.edn, > whatever.) At least this is how I made it work. The clojurescript support has a ~:target~ header argument to tell CIDER this is a clojurescript code, I don't know CIDER internal much, but CIDER eval should eval in a ClojureScript corresponding REPL. - -- [ 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----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5L4CcUHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsNx/Af/U3ZqKwelFTr0IO1evplCY/qHk4ON ICousQWbMmv29665xhI9fkxBFMSXSE6fb7LJadfPK/7NWVfl/OIP4rotmp3mICow FKzYuJ032MSiQma43LCADbXci8x7sTLUo5FlHI2pA6srypaqL4TcNIGnbVjO5UNg WGmYJwAr8pwnXls6sF8JkZB4e+NEtvQl3rhZtDxzfKYHIaz2OYJJ7ELJuEl4IB1G TQz+yzKgSdVeypHGj/t+Q0l2jTLDMFvrCOg/e0OWvuy2DSw4L/CEiS2NIv4CFftC qj0FWOnt5+GPzzpMGoaNpu5LZNoWWlrV99Jv9F2TeU/fNIgMdq+LASsrIw== =g/L7 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 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 0 siblings, 1 reply; 33+ messages in thread From: Bastien @ 2020-02-18 13:15 UTC (permalink / raw) To: stardiviner; +Cc: roberthambrock, emacs-orgmode Hi stardiviner, stardiviner <numbchild@gmail.com> writes: > I tested your method, true. And I also pulled that latest ob-clojure.el changes. > Works great, I like this new method more. Thanks for your > improvement. Thanks for your feedback. Also, you may have noted that the code for Clojure sessions has been removed - I could not make it work, even in previous versions. If you know sesman/cider better than I do and can propose to handle sesman/cider sessions correctly, please go ahead. By "correctly" I mean requesting the launch of a (sibling?) nREPL process buffer when :session is set to a string. > The clojurescript support has a ~:target~ header argument to tell CIDER this is a > clojurescript code, I don't know CIDER internal much, but CIDER eval should eval > in a ClojureScript corresponding REPL. Yes, what I meant was that for now ":target cljs" won't let you start a nREPL unless you are in a ClojureScript project. cider-jack-in-cljs will ask for the cljs method (figwheel-main, etc.) but if your org file is in, e.g., an empty directory, there is no such cljs configuration file. -- Bastien ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface 2020-02-18 13:15 ` Bastien @ 2020-02-19 15:51 ` stardiviner 0 siblings, 0 replies; 33+ messages in thread From: stardiviner @ 2020-02-19 15:51 UTC (permalink / raw) To: Bastien; +Cc: roberthambrock, emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Bastien <bzg@gnu.org> writes: > Hi stardiviner, > > stardiviner <numbchild@gmail.com> writes: > >> I tested your method, true. And I also pulled that latest ob-clojure.el changes. >> Works great, I like this new method more. Thanks for your >> improvement. > > Thanks for your feedback. > > Also, you may have noted that the code for Clojure sessions has been > removed - I could not make it work, even in previous versions. Yes, I always check related changes on Org Mode master branch source code. > > If you know sesman/cider better than I do and can propose to handle > sesman/cider sessions correctly, please go ahead. > > By "correctly" I mean requesting the launch of a (sibling?) nREPL > process buffer when :session is set to a string. Actually I'm not very familiar with CIDER, but I want to take a try. :) > >> The clojurescript support has a ~:target~ header argument to tell CIDER this is a >> clojurescript code, I don't know CIDER internal much, but CIDER eval should eval >> in a ClojureScript corresponding REPL. > > Yes, what I meant was that for now ":target cljs" won't let you start > a nREPL unless you are in a ClojureScript project. > > cider-jack-in-cljs will ask for the cljs method (figwheel-main, etc.) > but if your org file is in, e.g., an empty directory, there is no such > cljs configuration file. I agree. - -- [ 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----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5NWYoUHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsNpkggAtMIWaYdp6nJrNw820X8BZaL4luW4 hZeBf7YJaomopWZK5ToGquGMVTCsPuvxKtSBwlM00WEaklDfmDN6C50aqDvyVesk E+emQ4rF8a2A0LfvUw4CwoRLaqoa9gJUzGzwWFuz//HY8DHkl2n2jbTaLDLuzlOT laAFODwzGHbJlm/MFayKds+jLMLP95F5D+6G6ZPKitfnfyurAwp9OGnI9G63w9Ye LVD0Yqcr3jLUgHJfSSaUAny8DV9DOlvaVez1AZQosc//PER5DqxXHeMhaLMSNEGB RI7W6ufOfSRT0L4gQ3H9W4X34Kt28+Aoj2wGvx2q4niI9pxEkW1kLzpF2w== =LNjE -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH 3/4] ob-clojure.el: Use :ns flag in org-src-edit 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-22 20:50 ` [PATCH 2/4] ob-clojure.el: Add ClojureScript interface roberthambrock @ 2018-04-22 20:50 ` 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:29 ` [PATCH 0/4] Clojure mode patches Nicolas Goaziou 4 siblings, 2 replies; 33+ messages in thread From: roberthambrock @ 2018-04-22 20:50 UTC (permalink / raw) To: emacs-orgmode; +Cc: Robert Hambrock From: Robert Hambrock <roberthambrock@gmail.com> * lisp/ob-clojure.el (org-babel-edit-prep:clojure): New function that sets the buffer's namespace to the value of :ns, if provided. (org-babel-edit-prep:clojurescript): Alias for org-babel-edit-prep:clojure. --- lisp/ob-clojure.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 7f7c24ff1..c59ac96ab 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -215,6 +215,12 @@ using the :show-process parameter." (defun org-babel-execute:clojurescript (body params) (org-babel-execute:clojure body (cons '(:target . "cljs") params))) +(defun org-babel-edit-prep:clojure (babel-info) + (if-let* ((namespace (cdr (assq :ns (nth 2 babel-info))))) + (setq-local cider-buffer-ns namespace))) + +(defalias 'org-babel-edit-prep:clojurescript 'org-babel-edit-prep:clojure) + (provide 'ob-clojure) ;;; ob-clojure.el ends here -- 2.16.3 ^ permalink raw reply related [flat|nested] 33+ messages in thread
* Re: [PATCH 3/4] ob-clojure.el: Use :ns flag in org-src-edit 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 1 sibling, 0 replies; 33+ messages in thread From: Nicolas Goaziou @ 2018-04-23 9:26 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode Hello, roberthambrock@gmail.com writes: > * lisp/ob-clojure.el (org-babel-edit-prep:clojure): New function that > sets the buffer's namespace to the value of :ns, if provided. > (org-babel-edit-prep:clojurescript): Alias for > org-babel-edit-prep:clojure. Thank you. > +(defun org-babel-edit-prep:clojure (babel-info) > + (if-let* ((namespace (cdr (assq :ns (nth 2 babel-info))))) > + (setq-local cider-buffer-ns namespace))) Missing docstring. Also, please avoid `if-let*', which is non-standard, AFAIK. You can use `pcase' however. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 3/4] ob-clojure.el: Use :ns flag in org-src-edit 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 1 sibling, 0 replies; 33+ messages in thread From: stardiviner @ 2018-04-29 14:47 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 roberthambrock@gmail.com writes: How about the progress now? - -- [ stardiviner ] don't need to convince with trends. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrl2w4ACgkQG13xyVro msNSkQgAlaqu0VEuzJLluC7CzwNQAcWsGcftiM6OZnLL5GzLqb3M14OLg+INTvsy Yexi0gJpKQVnf0DEutvAjVQ3McgtqCUxqBiiP6BHAii632wmuSPwESaOTFK4o5WN I44NBBlp+5kg+2zIMx7vDQNLZSMmc7SvLP84XvOM5XMsDaDYiofPoBOW2MaB4W7f cXuBczZJKn05rYJLtyVG+UnmYihyWxBEbSPFwMKMjTl2Xd05znjN8xHt5RP/VMJr zjW96vAotXOpInlj6YdDgyBjxgIoOejIzduGbmVP9gR8XHaYAeqhpb+89Ltox/w7 zluFXnLPccU9aVbIoVHaK3HGHYJe2g== =znwu -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH 4/4] ob-clojure.el: Add ClojureScript tangle language extension 2018-04-22 20:49 [PATCH 0/4] Clojure mode patches roberthambrock ` (2 preceding siblings ...) 2018-04-22 20:50 ` [PATCH 3/4] ob-clojure.el: Use :ns flag in org-src-edit roberthambrock @ 2018-04-22 20:50 ` roberthambrock 2018-04-23 9:28 ` Nicolas Goaziou 2018-04-23 9:29 ` [PATCH 0/4] Clojure mode patches Nicolas Goaziou 4 siblings, 1 reply; 33+ messages in thread From: roberthambrock @ 2018-04-22 20:50 UTC (permalink / raw) To: emacs-orgmode; +Cc: Robert Hambrock From: Robert Hambrock <roberthambrock@gmail.com> * lisp/ob-clojure.el (org-babel-tangle-langs-exts): Add ClojureScript to the supported language extensions. --- lisp/ob-clojure.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index c59ac96ab..6fc5d043b 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -57,6 +57,7 @@ (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("clojure" . "clj")) +(add-to-list 'org-babel-tangle-lang-exts '("clojurescript" . "cljs")) (defvar org-babel-default-header-args:clojure '()) (defvar org-babel-header-args:clojure '((package . :any))) -- 2.16.3 ^ permalink raw reply related [flat|nested] 33+ messages in thread
* Re: [PATCH 4/4] ob-clojure.el: Add ClojureScript tangle language extension 2018-04-22 20:50 ` [PATCH 4/4] ob-clojure.el: Add ClojureScript tangle language extension roberthambrock @ 2018-04-23 9:28 ` Nicolas Goaziou 0 siblings, 0 replies; 33+ messages in thread From: Nicolas Goaziou @ 2018-04-23 9:28 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode Hello, roberthambrock@gmail.com writes: > * lisp/ob-clojure.el (org-babel-tangle-langs-exts): Add ClojureScript > to the supported language extensions. Thank you. Some comments follow. > (defvar org-babel-tangle-lang-exts) > (add-to-list 'org-babel-tangle-lang-exts '("clojure" . "clj")) > +(add-to-list 'org-babel-tangle-lang-exts '("clojurescript" . "cljs")) > > (defvar org-babel-default-header-args:clojure '()) > (defvar org-babel-header-args:clojure '((package . :any))) Don't you need to also define `org-babel-default-header-args:clojurescript' and `org-babel-header-args:clojurescript' ? Also, this entails a comment at the beginning of the library, IMO. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 0/4] Clojure mode patches 2018-04-22 20:49 [PATCH 0/4] Clojure mode patches roberthambrock ` (3 preceding siblings ...) 2018-04-22 20:50 ` [PATCH 4/4] ob-clojure.el: Add ClojureScript tangle language extension roberthambrock @ 2018-04-23 9:29 ` Nicolas Goaziou 4 siblings, 0 replies; 33+ messages in thread From: Nicolas Goaziou @ 2018-04-23 9:29 UTC (permalink / raw) To: roberthambrock; +Cc: emacs-orgmode Hello, roberthambrock@gmail.com writes: > These four patches are independent and can thus be applied individually. > > Please let me know if you have any questions. Thank you. What's your status wrt FSF papers? If you haven't signed them, you need to add TINYCHANGE at the end of the commit messages. Also, would you mind providing a couple of tests for the features you are introducing? Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2020-05-22 15:13 UTC | newest] Thread overview: 33+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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).