Lee Spector <lspec...@hampshire.edu> wrote: >On May 21, 2011, at 4:47 PM, mike.w.me...@gmail.com wrote: >> So, instead of having an editor command region/function reindent to >show the actual structure of the code, maybe you need to switch to a >repl and run (indent-code "myfile.clj") to see what the structure >really is. Actually, I would argue that that functionality ought to be >in clojure to to provide a "standard" of sorts that various >IDE's/editors can follow for indenting clojure. > >I see bits of pretty-printing functionality are already present, >although I haven't played with them and I'm not sure if they do this or >if they're intended to. I agree that it would be great to have this >functionality to help tool builders, if it's not already there. But I >don't think it's particularly helpful to require users to cut/paste >from their editor to a REPL and then back again to see the structure of >their code. It's certainly not beginner friendly.
I agree that having to cut & paste code to get a pretty printed version isn't useable - which is why I didn't suggest that. I suggested a function that would take a file name and pretty print the contents as code, which is as useable as reloading code in an environment without REPL integration. If JEdit doesn't have REPL integration, then this will integrate well with what users have to do to run code. If JEdit does, then possibly that can be used to create an in-editor code reindention, which would also integrate well with what users are used to. This won't help much with getting pretty-printed code into your editor - but that wasn't the goal. The goal was to show the user the LISP structure of the code to help them figure out what's wrong with it, and this is a minimal tool to achieve that goal. Given that code, a function to save a backup copy of a file and overwrite it's contents with pretty-printed code should be easy, would be useful for getting propelry printed code to share with others (not one of the core goals, but one worth adding a little code for) and falls into the range of useable for that goal. Pointing out a problem/missing feature is great - it's how tools become better. Insisting that the solution has to be the one you are used to, without considering the goals of the project in question, just help keep the existing roadblocks in place. -- Sent from my Android tablet with K-9 Mail. Please excuse my brevity. -- 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