On 5/1/2021 11:09 PM, Bastien wrote:
With `electric-indent-mode' being activated by default in Emacs, the
current behavior is that RET after a headline moves the point below
the beginning of this headline, not the beginning of the line, which
might surprise users.
Indentation is quite sensitive: what do you think of setting a new
default value of nil for `org-adapt-indentation' in Org 9.5?
I much prefer the current behavior as of 9.4.5. I'll try to explain my
reasoning. Of course like anyone, I'm biased, and got used to indenting
the text under a heading (pre-9.4) simply because that's where it ends
up if I hit TAB; in most other modes, TAB indents a line to where it
"should" be, so I reasoned that text under a heading should be indented.
Visually, I find indented text easier to scan. When my org document is
fully-expanded, I can still quickly glance at the left margin to see
when the outline level changes. It's much harder for me to do so when
there's a bunch of text that's flush with the left margin.
`org-indent-mode' can also do this, but I took to heart the Org Mode
motto ("Your life in plain text"): I try to ensure my org files look as
similar as possible regardless of whether they're opened in Emacs or a
plain text editor. Hence, I put the indentation in the actual org file
(and use `auto-fill-mode' to wrap the text)[1]. This makes it easier for
me to send a non-Emacs-using colleague one of my org files while
ensuring it's (somewhat) readable for them.
Finally, as someone who primarily uses Emacs to write software, I find
the current behavior to be more consistent with the other modes I use
most often. In all programming modes I'm familiar with, hitting RET will
create a new line, indented to the appropriate depth. For a
whitespace-dependent language like Python, this is really the *maximum*
depth that would make sense.
However, compared to Org Mode, python-mode has an advantage: if I hit
RET and the indentation isn't what I want (e.g. I was writing an `if'
block and now I'm done with it), I can hit TAB repeatedly to cycle
indentation levels. Org Mode does this when you've typed the "* " for a
heading (or plain list), but not for a blank line. If I'm typing some
text below a heading and hit RET to write some more, I might realize
that I *actually* want a new heading. I could try to type "* ", but as
I'm already indented, Org Mode rightly treats that as a plain list.
Currently, I just hit undo and then try again with C-RET to make a new
heading, but it might be nice to allow cycling indent levels on an
otherwise-empty line.
This reasoning might not apply for users who primarily use Emacs to edit
text documents, as I'm sure the indentation logic there is different
from editing source code. In that case, you could perhaps say that
`org-adapt-indentation' == t is for programmers, and == nil for writers. :)
Ultimately, I'm not sure this will convince anyone who disagrees, and
I'm not even sure my *goal* is to convince people (so long as I'm still
able to configure things the way I like). I just wanted to provide a
perspective from someone on the other side of the fence.
- Jim
[1] This doesn't quite work for links specified like [[url][title]], but
I see that as just a minor hiccup.