Tim Cross <theophil...@gmail.com> writes:
> Kyle Meyer <k...@kyleam.com> writes: > >> Kévin Le Gouguec writes: >> >>> Detlef Steuer <ste...@hsu-hh.de> writes: >>> Note that indenting section bodies by default predates Org 9.4: in Org >>> 9.3, hitting TAB on the first line of text after a heading indents it to >>> column LEVEL+1. >> >> Yes, org-adapt-indentation has been around (with a default of t) since >> 4be4c5623 (version 4.12a, 2008-01-31). >> >>> IMHO, the default value of org-adapt-indentation might be the issue here >>> (made more visible by the change in 9.4): I agree that hard-indenting >>> prose should not be the default behaviour. FWIW the .dir-locals.el file >>> at the root of Org's own repository sets this variable to nil; maybe >>> that suggests that it would be a better default? >> >> Perhaps. I certainly prefer org-adapt-indentation at nil and would vote >> for that if we were introducing the option today, but this would be >> changing a longstanding default. >> >> So, it seems that changing Org to honor electric-indent-mode is now >> making some users aware of org-adapt-indentation and that its default >> value is not what they want. > > Thanks for clarifying this Kyle. > > So essentially, this change has been made to make org-mode consistent > with the rest of emacs which enabled electric-indent by default in Emacs > 24. this is a good thing. Org should be consistent with other modes. Any > differences are likely to be the source of confusion and bug reports. > > I am a little confused about the purpose of org-adapt-indentation > though. According to the org news file, to get back the old behaviour, > it says to explicity disable electric-indent mode using org-mode-hook. > There is no mention of org-adapt-indentation. > > Is this just an artefact from before and in effect, we have two methods > to disable the indentation behaviour? Is there anything functionally > different between disabling electric-indent by calling > electric-indent-local-mode -1 or setting org-adapt-indent to nil or is > the result functionally equivalent? > Following up to my own question. The two are NOT functionally equivalent in that org-adapt-indentation supports other values than t or nil. You can use this variable to tweak how the adaptive indentation works. While setting it to nil may be equivalent to turning of electric-indent mode, it can be used to adjust how adaptive indentation works as well. Tim -- Tim Cross