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

Garrett Smith g@REDACTED
Wed Feb 5 20:18:09 CET 2014


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?

Garrett

On Wed, Feb 5, 2014 at 1:00 PM, Björn-Egil Dahlberg <egil@REDACTED> 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 <andrew@REDACTED>
>> wrote:
>>>
>>> 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
>>>> old).
>>>>
>>>> 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
>>> 8.
>>
>> I'm curious what the argument *for* mixed tabs and spaces is. It is to
>> save precious disk space?
>>
>> Garrett
>>
>> 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@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list