Cider

Running repl commands in cider (emacs)

code clojure emacs cider

Ok, I will admit.. this took a while. But I have found a nice way of doing this.

What is this? Well, let’s say let’s say that you have a command to start your server in user namespace. With this cool feature, now you can run this with a emacs command (or shortcut if you bind it).

The cool thing about this is that the command will run with the namespace from the repl and not the last ns that you loaded with cider =].

Here is a taste:

(defun le2m/cool-repl-command ()
 (interactive)
 (cider-interactive-eval
  (cider-insert-in-repl (format "(clojure.core/require 'a-namespace)
                                  (a-namespace/do-something
                                  (fn lambda-example [t] (:get-a-key (meta t))))") 't)))

  1. stackoverflow reference that started this

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Running repl commands in cider (emacs)

Fix incanters core.view in dwm

clojure cider dwm

Now, let’s face it. dwm is awesome. But sometimes, it needs adjustments. If you are using incanter and cannot see a plot with core.view function in a cider enviroment, all you have to do is export this variable into your enviroment before firing up cider.

export _JAVA_AWT_WM_NONREPARENTING=1

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Fix incanters core.view in dwm