Fork me on GitHub
#emacs
<
2020-09-08
>
Eccentric J01:09:00

Any guides for getting org-mode to work with Clojure? I seem to be able to execute code but I get a “Code block produced no output” no matter what I put into there.

Eccentric J01:09:14

Nevermind. Ended up being very small. Needed # -*- org-babel-clojure-backend: cider; -*- but had 'cider

deadghost17:09:19

Looking for some elisp regex help:

(replace-regexp-in-string "test/.*/" "test/\\1/unit/"
			  "/path/to/project/test/fruit/oranges.clj")
;; Desired
"/path/to/project/test/fruit/unit/oranges.clj"
;; Actual
"/path/to/project/test//unit/oranges.clj"

iarenaza17:09:30

@deadghost You need to use \( and \) (remember you need to double the \ when writing the regexp as a string) to define the match group that you are going to refer later with \\1:

(replace-regexp-in-string "test/\\(.*\\)/" "test/\\1/unit/"
                          "/path/to/project/test/fruit/oranges.clj") 

deadghost18:09:23

Ah thank you, I didn't double them.