emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
Bill Phillips 2020-03-22T16:07:47.239200Z

Not sure if this is #beginners or #emacs… I’m an emacs beginner! Anyway, my problem is that I want a rename refactor. I installed clj-refactor through M-x package-install and followed the README instructions to set it up in my emacs.d, but when I invoke it, it processes my project, asks me for the new variable name, and then fills the minibuffer with some kind of output and switches focus to my original buffer. I’d provide this output but I don’t know how to get it.

dpsutton 2020-03-22T16:19:29.239600Z

you can check the *Messages* buffer. It should have the message in there

👍 1
Bill Phillips 2020-03-22T16:30:16.240Z

K. This is what I’ve got:

cljr--get-valid-filename: Wrong type argument: hash-table-p, 
 (#s(hash-table size 7 test equal rehash-size 1.5 rehash-threshold 0.8125 
     data (:line-beg 101 
           :line-end 101 
           :col-beg 4 
           :col-end 17 
           :name "scaffold-node" 
           :file "/Users/bphillips/src/clojure/gascan/src/gascan/repl.clj" 
           :match "[scaffold-node]")) 
  #s(hash-table size 7 test equal rehash-size 1.5 rehash-threshold 0.8125 
     data (:line-beg 129 
           :line-end 129 
           :col-beg 30 
           :col-end 43
           :name "scaffold-node" 
           :file "/Users/bphillips/src/clojure/gascan/src/gascan/repl.clj" 
           :match "(loop [loc (z/vector-zip scaffold-node)]")))

dpsutton 2020-03-22T16:33:38.240700Z

check that your versions of cider and clj-refactor are up to date. i think they can get out of sync and break. hopefully the latest versions work together

👍 1
practicalli-john 2020-03-22T19:58:56.245600Z

Does rename refactor require the REPL to be running, I assume it does. I beieve you also need to have all the code in the project working (compiles without error) I stopped using clj-refactor and use helm-swoop to lists all instances of a symbol (function name) and C-c C-e to open the results of the search across the project in a buffer. Then I just use iedit or multiple cursors to make changes to that buffer and C-c C-c to commit the changes back to all the project files. I can do this for any text, so find it more useful than the clj-refactor rename.

Bill Phillips 2020-03-22T21:23:29.246100Z

And it does that by symbol reference? Not by string match?

Bill Phillips 2020-03-22T21:24:11.246600Z

All code is compiled and working

Bill Phillips 2020-03-22T21:38:48.246900Z

And the REPL is running, yes

Bill Phillips 2020-03-22T21:39:18.247500Z

I tried deleting cider and clj-refactor and installing the latest stable versions, but that doesn’t seem to do any good.

practicalli-john 2020-03-22T22:34:41.247600Z

I assume it's string matching as it has so many tools available in Emacs to support that, none of which require the REPL or code to be analyzed. It works and very fast too. I hope you get clj-refactor working, but for me it became redundant in Emacs (Spacemacs) and I haven't used it for over a year or two now.