Fork me on GitHub

Anyone getting: > nrepl-send-sync-request: Sync nREPL request timed out (op macroexpand expander macroexpand-1 code ... After upgrading to latest Cider?


Resolution was to use cider-nrepl latest (0.27.2), it fixes this and other nasty issues related to *out* handling


Resolution was to use cider-nrepl latest (0.27.2), it fixes this and other nasty issues related to *out* handling


Hello, I set up Emacs and Cider on a new computer and I can't figure how to activate the feature that when typing a short version of a namespace that has been already declared in another file (example [myproject.utils :as utils] ), the require entry is automatically added to the ns form. I looked into the clojure refactor options, found an entry for common namespaces (like io) but not for namespaces specific to the project. Thanks


The answer has two parts :) For well-known aliases such as io , the list is static and the feature is controlled by these two variables: Personally I expand cljr-magic-require-namespaces with a few more entries of my liking


Now, for dynamic alias completion depending on a specific project's used aliases, the feature is called cljr-slash . As the name suggests, it's good to bind it to the / keyboard shortcut if it's not already


Thanks for the info. The cljr-slash doesn't seem to work on my fresh Spacemacs install. When I type a short version of a namespace and the M-x cljr-slash , the slash is added but the namespace is not added to the ns form, while it is on my older Emacs installation (on my laptop).


what versions of clj-refactor.el and refactor-nrepl are you running?


clj-refactor: 20211004.908 refactor-nrepl: 3.0.0-alpha12


Fresh install


Lein or deps.edn?


What does this return in a clojure repl? (@(requiring-resolve 'refactor-nrepl.ns.libspecs/namespace-aliases))


 {sh (,
  t (tick.core clojure.test),
  x (net.cgrand.xforms),
  set (clojure.set),
  d (datomic.api)
  ... (namespaces from my project and more)
 {x (net.cgrand.xforms),
  set (clojure.set),
  p (promesa.core),
  ... (namespaces from my project and more)


The correct list of namespaces


So the 'backend' looks good Most likely the 'frontend' has an issue. Here is the list of recent commits , you'll note there are a couple ones touching clj-slash Personally I'm maintaining the backend, but run a forked version of clj-refactor.el so my knowledge doesn't apply directly there. I would check if this condition successfully returns a truthy value: i.e., place the cursor right after a slash, press M-: (per, and paste that (and ... sexpr. What does it return for you?


I did C-x C-e after the and parenthesis (to eval inline). It indeed returns an error :

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  substring(nil 0 0)
  replace-regexp-in-string("\n" " " nil)


Also, thanks for the debugging time.


same :) you don't know how valuable this is for all of us cider


so it seems easy at this point, is it for you? cljr--in-keyword-sans-alias-p appears to be the culprit, surely you can make it "nil-safe". I'd guess (cider-symbol-at-point) returning nil?


I have to log off. My suggestion would be to replace (cider-symbol-at-point) with (thing-at-point 'symbol) , re-eval the surrounding defun and see if that works. Regardless of the outcome, feel free to share the problem / your findings over a GH issue. Most likely we'll commit a fix that would be made available very quickly.


Hello @U45T93RA6 I also had to log off yesterday night. I tried (cider-symbol-at-point) and it seems to work well. It returns the symbol at point surrounded with quotes:

;; M-: (cider-symbol-at-point)
(cljr--in-keyword-sans-alias-p) returns nil


Do I open an issue with those informations or are there more things to check?


Arff, I updated the packages since I saw that there was a new version of clj-refactor and now helm is broken

Error (use-package): helm/:config: Invalid read syntax: ")"
I'll use my .emacs.d from my laptop meanwhile and check later if the clj-refactor bug is still there.


Arff again. The version of Emacs is not the same so Spacemacs reinstalls all the packages at their latest version. 😞

👀 1
Frederico Benevides20:10:32

Hi all. I'm getting this error Error: Does anyone know about this error? (nrepl-connected-hook): Error running hook "cider--connected-handler" because: (cl-no-applicable-method map-into ((right-margin 80)) hash-table)

Frederico Benevides21:10:43

Thank you. It worked!

bubblebobble 1