<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 7, 2014 at 2:42 AM, Vlad Dumitrescu <span dir="ltr"><<a href="mailto:vladdu55@gmail.com" target="_blank">vladdu55@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Just so that I make sure I understand correctly, in the light of the<br>
flame war that I recently started :-\<br>
<br>
The documentation says<br>
<br>
> Make sure your changes follow the coding and indentation style of the code surrounding your<br>
> changes. (At some point in the future, there will be a style guide, either included in the<br>
> documentation or on some web site, but it is not ready yet.)<br>
<br>
So if the local indentation is not what erlang-mode would give, then I<br>
still have to manually adjust it to match what already was there. Is<br>
that correct?<br></blockquote><div><br></div><div>IMO yes, that's correct. BTW this approach is typical of most software projects -- I recall being taken to task for breaking this rule way back in 1987, a lesson I've never forgotten.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Since I've had some diff look ok in emacs but not on github (or the<br>
other way around, I don't remember exactly), which one is the<br>
reference in case of mismatch?<br></blockquote><div><br></div><div>Of course, the typical reason for edits looking incorrect on github is using spaces where you need tabs for vice versa. Unfortunately, some files use a mixture of tabs and spaces, with some lines using tabs for leading whitespace and others using only spaces. My approach of dynamically setting the emacs indent-tabs-mode variable locally in the buffer based on searching the file for leading tabs upon opening it often works but isn't foolproof, since localized areas of the file might use spaces rather than tabs or vice versa. The only way I'm aware of to be fully sure that I'm respecting existing whitespace practices in the files I edit is to visually check the diffs.</div>
<div><br></div><div>--steve</div></div></div></div>