Org-mode mailing list
 help / color / mirror / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [POLL] Setting `org-adapt-indentation' to nil by default?
Date: Sun, 2 May 2021 11:31:55 -0700
Message-ID: <s6mr6r$17cg$1@ciao.gmane.io> (raw)
In-Reply-To: <878s4x3bwh.fsf@gnu.org>

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.



  parent reply	other threads:[~2021-05-02 18:41 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-02  6:09 Bastien
2021-05-02  7:13 ` Tim Cross
2021-05-02  8:06 ` Jean Louis
2021-05-02  8:47   ` Tim Cross
2021-05-02 20:18     ` Jean Louis
2021-05-02 22:25       ` Tim Cross
2021-05-03  7:41         ` Kévin Le Gouguec
2021-05-03 10:15         ` Jean Louis
2021-05-02  8:56   ` Bastien
2021-05-02  8:59     ` Bastien
2021-05-02 20:24       ` Jean Louis
2021-05-02 20:21     ` Jean Louis
2021-05-02 20:22     ` Jean Louis
2021-05-02 10:07 ` Eric S Fraga
2021-05-02 15:01 ` Detlef Steuer
2021-05-02 15:44   ` Colin Baxter
2021-05-02 15:46 ` Amin Bandali
2021-05-02 18:11   ` Tom Gillespie
2021-05-02 18:19     ` Nicolas Goaziou
2021-05-02 18:48       ` Tom Gillespie
2021-05-02 19:20         ` Nicolas Goaziou
2021-05-03 10:11   ` Dr. Arne Babenhauserheide
2021-05-02 18:31 ` Jim Porter [this message]
2021-05-02 20:44 ` Kévin Le Gouguec
2021-05-03  7:33   ` Kévin Le Gouguec
2021-05-03  8:06     ` Bastien
2021-05-03 12:53       ` Kévin Le Gouguec
2021-05-03 13:40         ` Bastien
2021-05-03 14:57           ` Kévin Le Gouguec
2021-05-06 14:50       ` Maxim Nikulin
2021-05-15 20:51         ` Bastien
2021-05-19 17:02           ` [PATCH] etc/ORG-NEWS: Suggest against disabling `electric-indent-mode' Maxim Nikulin
2021-05-20 12:25             ` Bastien
2021-05-19 17:08           ` [PATCH] org-faq.org: Expand "What is the best setup for indenting?" Maxim Nikulin
2021-05-19 18:06             ` Greg Minshall
2021-05-20 15:57               ` Maxim Nikulin
2021-05-21  2:45                 ` Greg Minshall
2021-05-27 16:11                   ` Maxim Nikulin
2021-05-21  9:38                 ` Bastien
2021-05-20 12:28             ` Bastien
2021-05-19 17:08           ` [POLL] Setting `org-adapt-indentation' to nil by default? Maxim Nikulin
2021-05-02 21:07 ` Jack Kamm
2021-05-05  7:54 ` Bastien
2021-05-06 14:13   ` Bastien
2021-05-09 16:42     ` Kévin Le Gouguec
2021-05-15 12:46       ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://orgmode.org

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='s6mr6r$17cg$1@ciao.gmane.io' \
    --to=jporterbugs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git