[erlang-questions] Controversial subject of the day: tabs and spaces for indentation

Vlad Dumitrescu <>
Wed Feb 5 20:33:56 CET 2014

On Wed, Feb 5, 2014 at 8:27 PM, Garrett Smith <> wrote:
> On Wed, Feb 5, 2014 at 1:24 PM, Vlad Dumitrescu <> wrote:
>> On Wed, Feb 5, 2014 at 8:18 PM, Garrett Smith <> wrote:
>>> It seems to me that this problem is easily solved by inverting the interests:
>>> - Fix erlang-mode to default to all spaces
>>> - OTP team includes the appropriate Emacs code headers in the source
>>> files (or the dot file in the source root directory as Magnus just
>>> pointed out) and leave them horribly formatted, per their preference
>>> Does this not trivially solve the world's Erlang indent problems?
>> Unfortunately, no. If I make a patch without emacs, my editor will
>> still use something else than a mix of tabs and spaces, so it will
>> have to be OTP-ified by hand (copying indentation from other lines) or
>> by running it through emacs just for that.
>> Which, in a funny turn of events, brings me to a question related to
>> the previous "holy war": can emacs open, reindent and save files in
>> bach mode? That would indeed help! (even if one would still have to
>> install emacs).
> This seems like a problem that can be confined to the OTP team and
> process, which is I think is a pretty small subset of all erlang-mode
> users, no? And changing erlang-mode to default to spaces doesn't make
> this worse does it?

You are right, it's better like you suggested and definitely a step in
the right direction. But I think that most Erlang projects are more
lenient regarding whitespace mismatches in patches (being much
smaller) and thus the project where it hurts the most to be
non-compliant is not going to be affected. Yet.


More information about the erlang-questions mailing list