[Top][All Lists]

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

Re: newline-and-indent vs. electric-indent-mode

From: Madhu
Subject: Re: newline-and-indent vs. electric-indent-mode
Date: Mon, 25 Jan 2021 07:26:03 +0530

* Stefan Monnier <jwva6t0s6vj.fsf-monnier+emacs@gnu.org> :
Wrote on Fri, 22 Jan 2021 22:16:39 -0500:

> I think `electric-indent-mode` is annoying in any case if the
> indentation code disagrees with your style.  There are lots of knobs to
> play with deciding when and were indentation happens, and it's hard to
> know what the statistically optimal heuristic.  So I won't try to argue
> that the current choice is best, but I think it's equally hard to argue
> that some other choice is best.
> If we could automatically detect when a reindentation is immediately
> undone by the user, maybe we could collect statistics.

As a data point, I find every design choice you have made in this area
has directly attacked my usage.  Typically In C-like modes turning it on
leads to spurious whitespace when I want to insert a new line. Which
means I have to *always* what electric indent does.  This may be an
excuse for introducing Telemetry in organizations like mozilla, but I
hope emacs development isn't driven by those devils.

I used to be benefit from emacs indentation by binding RET to
newline-and-indent and remain in control of indentation.  Since electric
indent the *only* I can use emacs is to globally turn electric mode off.
IN ALL CASES what it guesses for me is exactly what I do not want it to

Collecting the changes in a central place means that all modes are
affected.  I am unable to use any mode effectively which SM has touched.

It is a lost case when the behaviour that I have been using for years is
now broken and there is no path to fix it short of throwing all SMIE
code out of the window.  The problem is the new code is hostile by
design and only cares about enslaving me to its ideology and to change
my established work style and work behaviour. Invariably I have to give
up what I wanted to do and curse, and chalk it up as another victory of
the devil over me

reply via email to

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