From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aMHaKKiFsV9BZAAA0tVLHw (envelope-from ) for ; Sun, 15 Nov 2020 19:46:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8AXWJKiFsV8/EQAAbx9fmQ (envelope-from ) for ; Sun, 15 Nov 2020 19:46:48 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1829794051B for ; Sun, 15 Nov 2020 19:46:47 +0000 (UTC) Received: from localhost ([::1]:53354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keNz4-0006bc-K7 for larch@yhetil.org; Sun, 15 Nov 2020 14:46:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keNxB-0006bN-Mx for emacs-orgmode@gnu.org; Sun, 15 Nov 2020 14:44:49 -0500 Received: from static.rcdrun.com ([95.85.24.50]:54545) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keNx9-0007Oy-LC for emacs-orgmode@gnu.org; Sun, 15 Nov 2020 14:44:49 -0500 Received: from localhost ([::ffff:41.202.241.56]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002C0006.000000005FB1852C.00007076; Sun, 15 Nov 2020 19:44:43 +0000 Date: Sun, 15 Nov 2020 16:26:25 +0300 From: Jean Louis To: =?utf-8?B?S8Opdmlu?= Le Gouguec Subject: Re: Changed list indentation behavior: how to revert? Message-ID: References: <2020-11-13T18-23-43@devnull.Karl-Voit.at> <871rgxotcv.fsf@gmail.com> <87zh3koqgk.fsf@gmail.com> <871rgu7pt9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <871rgu7pt9.fsf@gmail.com> User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/15 14:44:45 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: mMT15kJqtngh * Kévin Le Gouguec [2020-11-15 15:45]: :PROPERTIES: :CREATED: [2020-11-15 Sun 16:26] :ID: e454756a-3123-42dc-8c44-8682f12927ad :END: > Jean Louis writes: > > > Indentation in fundamental mode: > > > > ** HereRET > > I come here. > > But only if I start indenting > > Like hereRET > > Then I continue here > > Hi Jean, > > My understanding of electric-indent-mode is that it tries to make "RET" > equivalent to "insert newline; indent according to major mode rules". > E.g. in c-mode, when point is after the brace: > > if (condition) { > > RET will move point to column 2, while C-j will just insert a newline > and stay at column 0. > Likewise in python-mode, when point is after the colon: > > def foobar(): > > RET will insert a newline and move point to column 4; C-j will stay at > column 0. > > Your counter-example in fundamental-mode only shows that there are no > "smart indentation" rules in this mode; hitting TAB more than once keeps > on inserting horizontal space unconditionally instead of snapping to the > "correct" indentation level. I know it behaves different in different modes. And there is also to consider (which I did not test in many modes) that in majority of modes not being programming language user may move either with TAB or SPC to any column and RET will be aligned to begin of that previous line. anywhere this lines alignes with the first one Which is generally good think. There is just slight difference, and that is what I learned from introduction to Org mode that it is "plain text" kind of mode. I can do and write how I wish. My habit comes from being used to indent when I want and then to follow indentation in that specific paragraph. That is really great. But I was not used to have it indented by programmer like the introduction of this new default feature, which I consider is not useful to be default. > I've used Emacs's programming language modes for years before finally > trying out Org, where I noticed that the keys were swapped: RET was the > "plain dumb newline" key, and C-j was the "smart newline-then-indent" > key. IIUC this was how the rest of Emacs behaved before > electric-indent-mode became enabled by default. > > I personally found the difference infuriating. Everywhere else in > Emacs, > - C-m and do smart indentation, > - C-j ≡ ^J ≡ (insert "\N{LINE FEED (LF)}") I understand it for you, you got also surprised as you were used to it. > The changes in Org 9.4 aimed to make Org consistent with this "new" > convention, so that hitting RET immediately indents paragraphs below a > heading (as if the user hit TAB right after inserting a newline), and a > user wishing to "just insert some vertical space" can just whale on > C-j. Somehow I protest against it as it is not what I learned from roots of Org writing, so introducing it as default is breaking habits and consistency. Observe this official presentation and you will see how current indentation is not consistent to what is shown: https://orgmode.org/resources/img/features/folding.gif Look at this official presentation and you will see that even headings are indented for which we say it should not be so: https://orgmode.org/resources/img/features/clocking.svg The official presentation here: https://orgmode.org/ does not show any indentation at all. And in Info file I find nothing of it. All I say, when default is introduced, should be well documented how and why. Before it is introduced it is better to discuss wider with people. Few of people reading these exchanges may find how to turn it off, majority will not find it. > FWIW, what I wonder about is /why/ Org hard-indents section bodies by > default (org-indent-mode, which I use, soft-indents instead using > overlays). > > IIUC this can be toggled off by setting org-adapt-indentation to nil; > FWIW this is what the .dir-locals.el file at the root of Org's > repository doe With 2000+ directories containing Org file of persons, held on this system that would mean turning it on 2000+ times. Because in general I do not use that type of indentation I have just set it in main ~/.emacs.d/init.el file. We concluded that configuring is easy and that is great. What is not concluded is that the default impacts too many people who may not find out how to configure it back and that designing user interface shall be made with more care.