Re: standalone indentation tool

2011-08-10 Thread Tom Faulhaber
> I've tried pprint and found it lacking as it inserts newlines in > awkward places apart from the medatada/comments issue mentioned. Are you using pprint with code-dispatch? That tends to work a lot better, though it will put newlines where it deems fit. This is either a good thing or a bad thing

Re: standalone indentation tool

2011-08-09 Thread Phil Hagelberg
On Tue, Aug 9, 2011 at 4:42 AM, Philipp Steinwender wrote: > sorry i didn't check the result. with --batch something went wrong. the > indentation gets weird. The --batch flag causes it to skip your personal dotfiles, so you will have to explicitly load clojure-mode. -Phil -- You received this

Re: standalone indentation tool

2011-08-09 Thread Bendlas
On Aug 7, 10:50 pm, Phil Hagelberg wrote: > I think your best bet is to use Emacs from the command-line. Even if > people edit outside Emacs, it's easy to invoke for indentation > purposes: > >     $ emacs --eval "(progn (find-file \"badly_indented.clj\") > (indent-region (point-min) (point-max))

Re: standalone indentation tool

2011-08-09 Thread Philipp Steinwender
sorry i didn't check the result. with --batch something went wrong. the indentation gets weird. -- 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 moderat

Re: standalone indentation tool

2011-08-09 Thread Philipp Steinwender
thanks for that lars. it works better. emacs does restart for each file, but it is faster than before because it only evaluates the code without ui. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

Re: standalone indentation tool

2011-08-08 Thread Lars Nilsson
On Mon, Aug 8, 2011 at 5:36 AM, Philipp Steinwender wrote: > thank you, that worked! > to re-indent all source files, I use it as bash script like: > $ find ./src ./test -name '*.clj' | xargs -I {} emacs --eval "(progn (setq > make-backup-files nil) (find-file \"{}\") (indent-region (point-min) >

Re: standalone indentation tool

2011-08-08 Thread Philipp Steinwender
thank you, that worked! to re-indent all source files, I use it as bash script like: $ find ./src ./test -name '*.clj' | xargs -I {} emacs --eval "(progn (setq make-backup-files nil) (find-file \"{}\") (indent-region (point-min) (point-max)) (untabify (point-min) (point-max)) (save-buffer) (kill

Re: standalone indentation tool

2011-08-07 Thread Phil Hagelberg
On Sun, Aug 7, 2011 at 6:17 AM, Philipp Steinwender wrote: > Is there a tool available that does indentation of clojure code and does not > depend on an editor/IDE? > we work on the same code together with different editors > (eclipse+counterclockwise and emacs). We often reindent the other's code

Re: standalone indentation tool

2011-08-07 Thread Alan Malloy
On Aug 7, 11:10 am, Eric Lavigne wrote: > > > The pprint function in the Clojure standard library indents Clojure > > source > > > code. > > >      http://richhickey.github.com/clojure/clojure.pprint-api.html > > > Er, won't you lose all comments and have reader macros expanded if you > > use read

Re: standalone indentation tool

2011-08-07 Thread Eric Lavigne
> > > > The pprint function in the Clojure standard library indents Clojure > source > > code. > > http://richhickey.github.com/clojure/clojure.pprint-api.html > > Er, won't you lose all comments and have reader macros expanded if you > use read/pprint to do the transformation? > Oops. I thin

Re: standalone indentation tool

2011-08-07 Thread Ken Wesson
On Sun, Aug 7, 2011 at 1:44 PM, Eric Lavigne wrote: > The pprint function in the Clojure standard library indents Clojure source > code. >      http://richhickey.github.com/clojure/clojure.pprint-api.html > To get the result you are looking for, a tool would need to walk through all > the *.clj fi

Re: standalone indentation tool

2011-08-07 Thread Eric Lavigne
The pprint function in the Clojure standard library indents Clojure source code. http://richhickey.github.com/clojure/clojure.pprint-api.html To get the result you are looking for, a tool would need to walk through all the *.clj files in your source directory and, for each file, read in the

standalone indentation tool

2011-08-07 Thread Philipp Steinwender
hi! Is there a tool available that does indentation of clojure code and does not depend on an editor/IDE? we work on the same code together with different editors (eclipse+counterclockwise and emacs). We often reindent the other's code what leads to changes when we merge our commits with git.