[erlang-questions] Controversial subject of the day: tabs and spaces for indentation
Wed Feb 5 20:24:28 CET 2014
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
> On Wed, Feb 5, 2014 at 1:00 PM, Björn-Egil Dahlberg <> wrote:
>> This is a war worth winning but it feels like every battle has been a loss
>> so far ..
>> As a member of the OTP-team and the *only* vim user, I can say that the rest
>> of OTP has utter disinterest to change the current format. (or so it seems
>> anyway =)
>> I guess Emacs does not allow indentation to be anything other than horrible.
>> Every time I've brought it up there is whining about some precious little
>> elisp file that can't handle the change.
>> I've gotten harassed on the number of '%' comment characters I'm supposed to
>> use for different context .. otherwise Emacs just explodes .. or something.
>> Ok, so perhaps I'm being a bit dramatic here =)
>> The truth is that a lot of code in otp is emacs:ified - that is the
>> convention. I think it's bad - but i've managed.
>> Tabs are problematic because code-rendering tools for reviewing code has a
>> lot of issues with it. *We should remove them*, but I'll guess hell will
>> freeze over well before that happens.
>> // Björn-Egil
>> On 2014-02-05 19:35, Garrett Smith wrote:
>>> On Wed, Feb 5, 2014 at 12:27 PM, Andrew Thompson <>
>>>> On Wed, Feb 05, 2014 at 07:14:30PM +0100, Vlad Dumitrescu wrote:
>>>>> Hi all,
>>>>> It's been almost a full day since the last controversial issue was
>>>>> discussed here and I feel it's time for a new one (well, it's actually
>>>>> The default indentation used by the erlang-mode uses a mix of tabs and
>>>>> spaces. Whatever side one is in the "tabs vs spaces" war, mixing them
>>>>> is the common enemy!
>>>> As a vim user, I find the emacs indent mode for erlang incredibly
>>>> annoying to 'fake' by hand. I'd love to see the tabs die as mixing tabs
>>>> and spaces makes erlang files a horrible mess when your tabstop is not
>>> I'm curious what the argument *for* mixed tabs and spaces is. It is to
>>> save precious disk space?
>>> P.S. I agree, going two to three days without religious material on
>>> the Erlang list is, well, it's just hard to go back now.
>>> erlang-questions mailing list
>> erlang-questions mailing list
> erlang-questions mailing list
More information about the erlang-questions