Fork me on GitHub

I am changing the :style/indent metadata on a macro defined in a .cljc file and cider is not picking it up. Is it caching it somewhere? I can't find out why is not seeing my updated metadata.. The var has the correct metadata (checked on REPL). Does anyone has any clue?


CIDER’s generating some indentation rules for clojure-mode from that metadata, so I’m guessing something there is not getting properly updated. I don’t recall any caching, but I also don’t remember that part of the code well, as it has stayed more or less the same for years.


Thanks @bozhidar I remember having this issue again in the past but somehow got fixed and I didn't bother finding out why. Maybe I will try turning it off and on again 😂

Karol Wójcik12:05:45

Hi guys. I would like to bind some Emacs key to a clojure function:

(defn some-function-called-by-keybinding 
on keybidings pressed I would like the evaluation of the function be sent to repl (some-function-called-by-keybinding). Can someone please guide me how should I do it?


you can start with something like:

(defun clj-cmd ()
    (with-current-buffer (cider-current-repl-buffer)
      (insert "(println {:clojure :data})")
      (execute-kbd-macro (kbd "<return>"))))


it should insert Clojure code into cider buffer




and this is why I love emacs 👀

Eric Ihli18:05:15

I can't get Cider to evaluate forms in my REPL. I'm running (cider-connect-cljs (:host "localhost" :port 9000 :cljs-repl-type shadow))` and it's creating a session with a clj object instead of a cljs object. I think this is the cause because I think Cider searches for CLJS repls from (cider-repls :cljs) and that expression is returning "No :cljs REPLs in current session", but I'm stuck at what to do next. Any thoughts?

CIDER Sessions:

  1: code/video-series:localhost:9000
      linked-to: proj(~/code/video-series/)  
        objects: *cider-repl %s(clj)*  

Eric Ihli19:05:36

I still don't know what was causing this, but I bumped clojurescript from 1.10.520 to 1.10.742 and shadow-cljs from 2.8.52 to 2.8.107 and now cider-connect is working.


I'm connecting to a NREPL running on a Windows machine via Vagrant. It kinda works, but CIDER keeps throwing errors related to string-prefix-p

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  compare-strings(nil 0 0 "/home/frozenlock/Docsolver/master/apps/basil/agent/" 0 0 nil)
  string-prefix-p(nil "/home/frozenlock/Docsolver/master/apps/basil/agent/")
  #f(compiled-function (path) #<bytecode 0x1136b4d>)(nil)
  #f(compiled-function (elt) #<bytecode 0x1136b65>)(nil)
  mapc(#f(compiled-function (elt) #<bytecode 0x1136b65>) (nil nil nil nil nil))
  seq-do(#f(compiled-function (elt) #<bytecode 0x1136b65>) (nil nil nil nil nil))
  seq-find(#f(compiled-function (path) #<bytecode 0x1136b4d>) (nil nil nil nil nil))
  #f(compiled-function (system session) #<bytecode 0x1bdf7d5>)(CIDER ("libs/bundle:vagrant-machine:6666" #<buffer *cider-repl libs/bundle:vagrant-machine:6666(clj)*>))
  apply(#f(compiled-function (system session) #<bytecode 0x1bdf7d5>) CIDER ("libs/bundle:vagrant-machine:6666" #<buffer *cider-repl libs/bundle:vagrant-machine:6666(clj)*>))
  sesman-friendly-session-p(CIDER ("libs/bundle:vagrant-machine:6666" #<buffer *cider-repl libs/bundle:vagrant-machine:6666(clj)*>))
I think it's related to this part of the code Does it ring any bell?


@frozenlock Yeah, seems that path is not something CIDER expects. It’s best to file some ticket for this.


I’m happy to report that I finally came up with a simple fix for and It took me a while, but it gets the job done and adds almost no complexity.