On Nov 3, 2011, at 6:14 PM, Joost wrote: > > > On Nov 3, 10:52 pm, Chas Emerick <cemer...@snowtide.com> wrote: >> Joost, >> >> This looks great. I think I might have been vaguely aware of >> clojure-refactoring before, but I'm glad to have been reminded of it. >> >> Q: how much of it is Emacs/SLIME specific? >> >> I ask because I'd love to see the advertised functionality rolled into >> Counterclockwise (and any other Clojure tooling out there). Such common >> tooling libraries were contemplated here, FWIW: >> >> http://dev.clojure.org/display/design/IDE+tooling+backend >> >> …though there's no refactoring section there (yet, *hint* ;-) > > I was sort of expecting this question :) > > Much of the code is actually editor-agnostic; the real refactoring > code is all pure clojure and implements its own parser/generator. The > main API requires an interface that can recognize clojure expressions/ > def forms and pass them as strings. > > The actual communication with the editor is done over the SLIME > protocol, but aside from the global rename refactoring, which needs to > touch files all over a project, it doesn't seem to be too complex > (mostly because it's sending the code as strings instead of trying to > be clever with s-expressions). > > As far as I can see, it's definitely possible to split out the editor- > agnostic parts of the code into its own package, and I expect that > would be useful for more than just refactoring tools too; automated > code formatting would be another possible use for one. > > I'd be willing to put some work into making the code more accessible > to other editors/programs, but I'm not personally motivated to develop > and maintain any bindings for editors other than Emacs right now. I > don't have the time to learn how to use them or to test any issues > that may turn up on those systems. > > In other words; somebody else has to be willing to take up the work of > binding the basic refactoring code to their editor of choice (and > maintain the bindings!) but if someone is willing to do that, I'm > willing to make their usage of the clojure-refactoring code as > painless as reasonable.
I've only looked at the code for ~5 minutes, but I think I might understand what's going on. To confirm: clojure-refactoring is sending something like diffs back to the refactoring-mode/SLIME, and that mode/emacs is what is actually performing the modifications to affected files? Thanks, - Chas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en