Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [clojure]

Clojure is a modern Lisp dialect for the Java Virtual Machine (with versions for the CLR and JavaScript).

2
votes
0answers
23 views

Speedbar tag hierarchy in Clojure - organize manually with comments?

If I run speedbar and call (speedbar-add-supported-extension ".clj") in init.el, then I see my Clojure files in the speedbar, and I can expand them to show the function definitions inside, like this: ...
0
votes
0answers
54 views

M-x cider-jack-in, nrepl won't start

I am completely new to Emacs so apologies if this is a stupid question. I am following the Emacs configuration as outlined in Clojure for the Brave and True. Unfortunately, when trying to start the ...
2
votes
1answer
55 views

CIDER, how to fix “No cljs REPLs in current session” error

I'm editing a ClojureScript file, and I have a working ClojureScript REPL in another buffer. But when I try to evaluate a form in my file ui.cljs, with C-c C-c, I get a beep an a message in the mini-...
2
votes
1answer
61 views

When using `lisp-state`, how can we repeat an action like slurp, and bind a key to easily perform the repeat?

In vim, I frequently used the "." shortcut for repeating the last command. I found this extremely useful especially when working with clojure tools to do things like slurp-ing and barf-ing to refactor ...
1
vote
2answers
56 views

Can't type unbalanced closing curly brace in Clojure mode

When I open a Clojure file, and I'm not using Paredit, I expect to be able to type unbalanced parentheses and brackets. I can type any of these characters: ()[]{, balanced on not. But if I try to type ...
1
vote
1answer
112 views

How to use clojure-lsp in Emacs?

I downloaded clojure-lsp (https://github.com/snoe/clojure-lsp) and tried to add it as a client in my init.el: (use-package lsp-mode :ensure t) (use-package lsp-ui :ensure t :config ...
1
vote
0answers
90 views

How to make Lisp state a default instead of normal?

I'm learning Clojure and Emacs at the same time 🤕 I use Spacemacs with Evil. Recently I've learned about Lisp state and I find it very handy. The only problem is that whenever I switch to insert ...
2
votes
1answer
63 views

Halting Clojure debugger after pressing the Continue Command

I use Emacs with Cider to debug Clojure Code. After setting a breakpoint using the default debugging framework, there appears the list of debugging options one might execute shown in this Figure I ...
0
votes
1answer
96 views

Datomic for emacs/elisp

Does emacs/elisp have something equivalent or similar to Clojure's datomic? What I tried: google emacs datomic fyi by datomic I'm referring to this: https://en.wikipedia.org/wiki/Datomic
3
votes
1answer
85 views

Evaluating `org-babel-clojure` blocks returns all form evaluations

I'm trying to set up babel for use with Clojure according to http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html#org85bc1ec and I can evaluate code but when I evaluate a block with ...
1
vote
1answer
40 views

How do I add the following key bindings to my Emacs startup script?

I'm learning Clojure. Every day, I open up Emacs and key in the following commands: C-x 3 ; create a new window on the right M-x cider-jack-in ; open up a REPL C-x o ; switch to my left window C-x ...
3
votes
5answers
1k views

cider-jack-in: Symbol's function definition is void: clojure-project-dir with closure-mode installed

M-x (cider-jack-in) cider-jack-in: Symbol's function definition is void: clojure-project-dir lein run "Hello World!" cat ~/.lein/profiles.clj {:user {:plugins [[cider/cider-nrepl "0....
10
votes
4answers
1k views

Clojure code evaluation in org-mode produces no output

I am trying to run clojure code from my org file in order to do some literate programming. What is not working: When I execute the source code block I get No output produced. Sample src code block ...
4
votes
1answer
336 views

How to generate inline plot result for ob-clojure?

Question: How to generate inline plot image result in Org-mode babel clojure src block? I tried some ways: First way: use :results file :file "clojure-babel-figure-result.png" #+BEGIN_SRC clojure :...
3
votes
2answers
153 views

Deep eager macroexpansion

This works: (require 'clojure-mode) (when (member 'clojure-mode my-packages) (define-clojure-indent (-> 1) (->> 1))) This gives the error Wrong type argument: listp, 1: (when (...
2
votes
0answers
514 views

Show all library functions in autocomplete with Cider

When I have imported the reagent.core library as reagent and I type (reagent/ I want to see all possible functions from that library I can use, preferably with documentation. Unfortunately I get only ...
1
vote
1answer
256 views

popup package not found when installing ac-cider package

When I try to install ac-cider via package-install or via init.el I get the message http://melpa-stable.milkbox.net/packages/popup-20160531.425.el: Not Found: This is the code in my init.el: (...
3
votes
1answer
152 views

Custom indentation for clojure macros in *.clj files

I'd like to know if there is a way to define the indentation for a custom macro within the clojure source file. It is possible to define the indentation using clojure-mode, but as far as I can tell, ...
1
vote
2answers
262 views

er/expand-region not working as previously under Emacs 25.1

I've got er/expand-region behaving very strangely and I don't understand what I did wrong (besides upgrading to Emacs 25.1.50). If I've got this in an elisp file: (defun foo (p) (* 2 2) p) (that ...
5
votes
1answer
1k views

cider-jack-in: Symbol's function definition is void: clojure-project-dir

When I run cider-jack-in the following error appears. Symbol's function definition is void: clojure-project-dir I am very new to Emacs and this is totally stumping me. Let me know if you need more ...
6
votes
2answers
348 views

How can I quickly switch between source namespace and test namespace?

In Cider, I can use C-c , to run the tests for the current namespace. This will work whether I'm currently in the source namespace or the test namespace itself (and indeed, this magic behavior is ...
0
votes
1answer
99 views

Is there an eval-defun alternative for Clojure mode?

When I define a function in Emacs Lisp mode, you can evaluate it with moving the pointer to the last parenthese of a function, and do C-xC-e. Aka calling eval-last-sexp. I thought this is somewhat a ...
2
votes
0answers
1k views

How can I properly reload my code from the REPL?

I have a src/example/foo.clj file: (ns example.foo) (defn my-fn [] (println "Hello, world!")) I can open it in Emacs and spin up a REPL using C-c M-j and play with it. I don't want to type long ...
2
votes
1answer
173 views

Reloading Clojure nrepl automatically

The way that I'm reloading the nrepl in Clojure seems too bulky. When I load a Clojure project and nrepl, I: Create a keyboard macro to input and return something like (use 'my-namespace.core :...
2
votes
2answers
105 views

How do I perform a sequence of actions with a single keybinding?

i am using cider. I want to do the following: when I finish editing in a source buffer, I want to compile the source and execute it in the repl, all with a single key-binding. In cider-mode, ...
0
votes
1answer
82 views

remove delimiter and comment typing from [Ljava.lang.String; in clojure-mode

Parsing parentheses: smie vs syntax table gives one example of how to use syntax-propertize-function but I wonder if someone could help me with another example. I'm working with clojure-mode. Here's ...
1
vote
3answers
464 views

How to set cider using boot middle ware?

In Emacs with cider and lein installed, I can M-x cider-jack-in to start clojure repl. I installed boot and would like to switch from lein to boot. How to set cider to use boot middle ware? (I don't ...
1
vote
0answers
160 views

org mode with clojure - can't get export to work

I'm a relative emacs newbie and have set up my emacs (24.4.1) to work with clojure. The gist of it is that I am now using the latest org-mode from git and loading it in my init.el (I am using prelude ...
3
votes
2answers
239 views

Evaluate paragraph in cider

I'm new to Emacs (after 10+ years of Vim) and want to use it primarily for clojure. Coming from Lighttable, one thing I absolute liked was the way it evaluated just the right sections of code no ...
1
vote
1answer
349 views

How to set up Emacs with Clozure CL but without SLIME

I want to manually set up my own Emacs CL environment on Mac OS X Lion without the SLIME package i.e. it will use only Clozure CL. Or to explain it another way, I want to use Emacs CL just like I ...
5
votes
3answers
767 views

Running all tests in a leiningen project?

Is there a way, via cider or some other emacs extension, to run all of the tests in a leiningen project? cider has the function cider-test-run-tests which attempts to just run the tests related to ...
1
vote
0answers
64 views

How can I make nrepl-ritz-jack-in work remotely over TRAMP / Emacs

What I want: I have a clojure program on a remote site, let's call it mccarthy. What I want to do is connect to a nrepl-ritz from my laptop, preferably using nrepl-ritz-jack-in. The jack in works ...