From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.devel Subject: Re: newline-and-indent vs. electric-indent-mode Date: Mon, 25 Jan 2021 07:26:03 +0530 Message-ID: References: <87wnw5yt58.fsf@hajtower> <01d07f6d-cc4c-2f54-4bae-a611bba7be93@yandex.ru> <66b7932d-4cee-9628-fae0-168ee6ebc041@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28725"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Cancel-Lock: sha1:DPx4+hKkO/oBp/JgjpIcpSsX4xU= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 25 02:56:43 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l3r7S-0007Lj-3H for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jan 2021 02:56:42 +0100 Original-Received: from localhost ([::1]:57358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3r7R-0007sL-5n for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Jan 2021 20:56:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3r6x-0007TU-G8 for emacs-devel@gnu.org; Sun, 24 Jan 2021 20:56:11 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:56506) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3r6u-0004bH-Kr for emacs-devel@gnu.org; Sun, 24 Jan 2021 20:56:11 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1l3r6q-0006cI-Lr for emacs-devel@gnu.org; Mon, 25 Jan 2021 02:56:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263369 Archived-At: * Stefan Monnier : 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 do. 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