<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Here is my script for re-indent: https://github.com/andrzejsliwa/vimfiles/blob/master/emacs_indent.sh</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I used it before switch to Emacs.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">it also using emacs in batch mode, and trying guess correct path to emacs-mode (for linux and macosx)</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">this script was base for reformat in intellij-erlang for emacs way formatting.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Best Regards,</div> Andrzej<br><p style="color:#A0A0A8;">On 6 Feb 2014 at 12:35:28, Vlad Dumitrescu (<a href="mailto://vladdu55@gmail.com">vladdu55@gmail.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div>
<title></title>
<p dir="ltr"><br>
On 6 Feb 2014 12:27, "Bengt Kleberg" <<a href="mailto:bengt.kleberg@ericsson.com">bengt.kleberg@ericsson.com</a>>
wrote:<br>
><br>
> Greetings,<br>
><br>
> These are my opinions, not facts.<br>
><br>
> Does your "erl-indent" program format according to the current
OTP style<br>
> guide? It would be very good if that was the case.</p>
<p dir="ltr">It uses erlang - mode to indent. I certainly assume
that it uses the style recommended by otp.</p>
<p dir="ltr">Not all otp source files are idempotent under the
indentation, so it might mean that not all are following the otp
style.</p>
<p dir="ltr">/vlad</p>
<p dir="ltr">><br>
> bengt<br>
><br>
> On Thu, 2014-02-06 at 10:43 +0100, Vlad Dumitrescu
wrote:<br>
> > On Thu, Feb 6, 2014 at 10:31 AM, Lukas Larsson
<<a href="mailto:lukas@erlang.org">lukas@erlang.org</a>>
wrote:<br>
> > > On Thu, Feb 6, 2014 at 9:38 AM, Loïc Hoguin
<<a href="mailto:essen@ninenines.eu">essen@ninenines.eu</a>>
wrote:<br>
> > >><br>
> > >> Plus this doesn't help your code get merged at
all. If you submit code<br>
> > >> with broken whitespace, then tools will also
display this whitespace change.<br>
> > >> You can of course hide whitespace changes, but
the problem is that<br>
> > >> whitespace does matter in some places, so you're
basically hiding<br>
> > >> potentially important information by doing
that.<br>
> > >><br>
> > > This is in my opinion the reason why it would be a
very bad thing to do a<br>
> > > huge commit that changes the current whitespace
format of a project to<br>
> > > another. It is already very hard to figure out what
change could have caused<br>
> > > a bug without having to deal with whitespace changes
in the middle of a<br>
> > > diff.<br>
> ><br>
> > Yes, if such a thing would be done, the best time is as a
separate<br>
> > commit right before a release, this will minimize the
number of<br>
> > merges/rebases with mixed styles of indentation. Of
course, as Lukas<br>
> > points out, if diffing with older code, then you have a
problem.<br>
> ><br>
> > Anyway, I have a suggestion for a workaround at<br>
> > <a href="https://gist.github.com/vladdu/8841089">https://gist.github.com/vladdu/8841089</a>.
Put those files in your ~/bin<br>
> > (which should be on $PATH), edit them to match your
system and style<br>
> > and you can reindent files simply by running
"erl-indent<br>
> > /path/to/myfile.erl". It still requires to have emacs
installed, but I<br>
> > can live with that.<br>
> ><br>
> > The downside is that if you want to use only spaces, then
the whole<br>
> > file will be changed to use them. The really big downside
is that with<br>
> > this tool there will be even less incitament to change
the indentation<br>
> > style...<br>
> ><br>
> > regards,<br>
> > Vlad<br>
> > _______________________________________________<br>
> > erlang-questions mailing list<br>
> > <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> > <a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</p>
_______________________________________________
<br>erlang-questions mailing list
<br>erlang-questions@erlang.org
<br>http://erlang.org/mailman/listinfo/erlang-questions
<br></div></div></span></blockquote></body></html>