Fork me on GitHub

Hi all, I'm testing cider-path-translations and I was wondering if I can use function calls instead of fixed strings for the values -


Those should be static after getting the value yes? There’s a way to eval in dir locals so you should be good to go


ok, testing again as I didn't make it work


just found that one, will try it out


I made several attempts and without luck ... the whole eval in local-dirs is too advanced for an Emacs newbie like me


> You can specify the variables mode, eval, and unibyte in your .dir-locals.el, and they have the same meanings as they would have in file local variables. coding cannot be specified as a directory local variable. See File Variables.


> eval evaluates the specified Lisp expression (the value returned by that expression is ignored).

Lucas Barbosa18:11:52

I was getting some NullPointerExceptions on a cljs project when cider tried to autocomplete. After browsing cider's repository, I found guidance to set cider-enhanced-cljs-completion-p flag to nil and it worked. Completion works, but now I wonder: am I loosing something significant by disabling this flag?


You are loosing completion on js interop stuff.

Lucas Barbosa19:11:07

Is there a simple way to find out the reason for the NPE? Like turning on some enhanced trace log or something like this.. sorry, I don't know much about the internals of the nrepl middleware


I don't think there is truly a simply way but one approach is to locate the cider-nrepl jar (e.g. ~/.m2/repository/cider/cider-nrepl/0.22.4/cider-nrepl-0.22.4.jar) and open it in emacs. Emacs is able to open and edit individual compressed files inside most jars. When you locate cider/nrepl/inlined_deps/suitable/v0v2v14/suitable/complete_for_nrepl.clj open it and change the debug var at the top to true. Restart the repl and see if you get a more helpful error output. If not, you can try to sprinkle in printlns.


A better way to debug is to have a clj and cljs repl into the same jvm process. I usually have an nrepl namespace in my projects that sets up the two nrepl servers. With that you can connect the clj session and then incrementally evaluate e.g. debug stmts in the jar code above. that saves you from restarts and such.