8
votes
cider-jack-in: Symbol's function definition is void: clojure-project-dir with closure-mode installed
In my case it was using a few old packages. The easiest way was to just upgrade all the packages. I was using the default download from the book Clojure for the Brave and True.
Steps (within Emacs):
M-...
5
votes
cider-jack-in: Symbol's function definition is void: clojure-project-dir with closure-mode installed
For anyone who is still stumbling onto this error, I just managed to fix mine. The problem arises when trying to update the packages that are found in the emacs configuration for the Clojure for the ...
5
votes
Accepted
Datomic for emacs/elisp
Considering that Datomic is a commercial-grade database system with a Datalog query language, good scalability and time traveling capabilities, this is rather unlikely. I'm only aware of two database ...
4
votes
Accepted
Evaluating `org-babel-clojure` blocks returns nill & result
#+begin_src clojure :results pp
(+ 1 4)
#+end_src
#+RESULTS:
: 5
#+begin_src clojure :results output
(print "Hello World!")
#+end_src
#+RESULTS:
: Hello World!
So we have to specify the output.
2
votes
Can't type unbalanced closing curly brace in Clojure mode
The problem only occurs after you've turned paredit on and off: this is because clojure-mode adds a hook to paredit-mode, and that hook adds some paredit-mode keybindings to the clojure-mode map.
In ...
2
votes
When using `lisp-state`, how can we repeat an action like slurp, and bind a key to easily perform the repeat?
In Vim, the . key repeats the last change made in normal mode.
The slurping scenario you describe is some random function that is beyond evil. Your guess is as good as mine in regards to how that ...
2
votes
Accepted
Show @ symbol in different color in clojure mode
Based on the examples in section Customizing Search-Based Fontification of the elisp manual, I would propose this:
(add-hook
'clojure-mode-hook
(lambda ()
(font-lock-add-keywords nil
...
2
votes
Accepted
Key binding to run Clojure code in running cider REPL and specified namespace
As I understand it, you basically want to run a command in the REPL. That is, I think you're saying you want to press C-M-S-g and have it execute (go) in the REPL.
Emacs interacts with processes ...
1
vote
Get current namespace with elisp
I managed to get the namespace with cider-current-ns.
(defun generate-mock ()
(interactive)
(let* ((sym (symbol-at-point))
(current-ns (cider-current-ns))
(require-code "(...
1
vote
Accepted
How to fix the installation of package clj-refactor?
This problem was totally related to the previous problem.
I only found this after having written most part of the question. Hence, I decided to answer it and leave it as content that could help other ...
1
vote
Issue when expanding clojure source blocks
I got what I wanted to work by changing the text expand function to
(defun org-babel-expand-body:text (body params)
(replace-regexp-in-string (regexp-quote "\n") "\\n" (org-trim ...
1
vote
Clojure nrepl: 'cider-jack-in returns error: "Spawning child process: Invalid argument"
Try M-x cider-connect if you've already started a REPL via leiningen yourself.
cider-jack-in tries to start a repl-server and connect to it. For some reason, this fails, maybe because of the already ...
1
vote
Accepted
Prelude: How to add smartparens key bindings to C-c prefix?
Sounds like you want to define a new prefix key, say C-c z, for cider-mode, binding it to a smart-parens keymap.
Assuming that smart-parens-mode-map is that keymap, and assuming that cider-mode-map ...
1
vote
CIDER, how to fix "No cljs REPLs in current session" error
There is a detailed comparison of the different cljs repls to date in lambdaisland
Borrowing from this rich and reputable source here is the bits of code you need to have configured for running ...
1
vote
Can't type unbalanced closing curly brace in Clojure mode
You can insert unbalanced parentheses with C-q (quoted-insert).
If you really don't want Clojure Mode to bind { and } to ParEdit keys, here is a work-around:
(add-hook 'clojure-mode-hook
(...
1
vote
How to use clojure-lsp in Emacs?
There are now instructions for configuration with emacs lsp-mode. The following is taken from what's currently there. You will need to start by putting the clojure-lsp executable on your path.
(...
1
vote
How to use clojure-lsp in Emacs?
It turns out that lsp-mode is currently being reworked. That means that the syntax for registering servers works different now:
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-...
1
vote
Evaluating `org-babel-clojure` blocks returns all form evaluations
To get the result of the last sexp in a block use the following argument in the header: :results value pp.
To evaluate using cider withing the code block, bind cider-eval-last-sexp within org in ...
1
vote
Accepted
How to generate inline plot result for ob-clojure?
By pass in target directory as path into Clojure code, and use java.io.File.renameTo to move generate plot image file to target dir.
Here is the complete story background: https://stardiviner.github....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
clojure × 51cider × 22
org-mode × 6
nrepl × 6
spacemacs × 5
key-bindings × 4
org-babel × 4
debugging × 4
evil × 2
elisp × 2
lsp-mode × 2
lsp × 2
testing × 2
babel × 2
org-export × 1
init-file × 1
package × 1
osx × 1
hooks × 1
use-package × 1
keymap × 1
syntax-highlighting × 1
doom × 1
minor-mode × 1
region × 1