help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Tab completion and electric-indent-mode


From: carlmarcos
Subject: Re: [External] : Tab completion and electric-indent-mode
Date: Sat, 18 Jun 2022 06:20:43 +0200 (CEST)

Jun 17, 2022, 17:41 by incal@dataswamp.org:

> Drew Adams wrote:
>
>>> `electric-indent-mode` says that in does "On-the-fly
>>> Reindentation". What does that mean, and how is it
>>> different to normal indentation?
>>>
>>
>> What's "normal indentation"?
>>
>
> I was thinking the same! Capable programmers think the
> same ...
>

There seems to be some basic initial indentation (call it normal).  This could 
be followed be
a subsequent reindent.

> Isn't there a PhD thesis in CS on this where they have
> subdivided it into categories with pros and cons?
>
> In this thread we have encountered
>
> 0. languages that demand indentation to be a certain way (e.g. Python)
>
> 0. situations where TABs are mandatory (e.g. a Makefile for
>  GNU make), i.e. SPC doesn't work
>
> 0. indentation that is done "on the fly" (I agree with whoever
>  just said it isn't clear what that's supposed to mean?)
>

Right.  Confusing what it is doing.

> Note 0:
>  Indenting the code your way, which often is just one or two
>  cases, the rest is the same as everyone else does it - this
>  can be a way to "get into" a bunch of code you originally
>  didn't write, rather it was handed over to you, be it from
>  some intelligence agency, maybe Mossad or the FSB ...
>

Isn't working with the code your way a basic premise of free software?
When emacs is the flagship of the Gnu System, working with the code
your way should actually be supported.


> Note 0:
>  "May I indent your code?", one should be careful saying to
>  a fellow programmer, perhaps.
>
> Note 0:
>  With some languages (e.g. Haskell) you often get stuck doing
>  indentation manually for ages, and after changing some
>  thing, it "has to" be adjusted for that, all of it; I don't
>  know if that is because of Haskell's formal approach and
>  style that resembles math, or Haskell's inherent
>  neuroticism, or if it is some feature of the language, be it
>  the support for and focus on pattern matching often and
>  a lot, the function arguments not the least ...
>
> - HEY, why aren't the digits increasing?!
>
> Because ... these are technical details,
> implementation-specific solutions, as well as general hacker
> lore & legend, what I look for is rather styles of the
> indentation itself. Like "this indentation style is called
> 'leap-and-return' and what characterizes it is its focus on
> [etc etc]"
>
> - Ah, there you go. Thanks for the answer!
>
> np :)
>
> -- 
> underground experts united
> https://dataswamp.org/~incal
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]