emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: James Powell <powellj@pdx.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: spurious change in list indent cursor motion [9.4.4 (9.4.4-dist @ /home/powellj/elisp/org-9.4.4/lisp/)]
Date: Sun, 09 May 2021 23:58:57 +0200	[thread overview]
Message-ID: <87sg2vzhzy.fsf@gmail.com> (raw)
In-Reply-To: <daf746b1-dba9-18c9-8f77-c0c823c4169f@pdx.edu> (James Powell's message of "Sun, 9 May 2021 14:17:54 -0700")

James Powell <powellj@pdx.edu> writes:

> I open a new file, /tmp/demo.org, and I start a new list
> by typing "<enter>- a<enter>".  It appears:
> - a
> What I expect: my cursor should now be at column 0.  This was the
> behavior in 9.3.6 and it makes perfect sense.
> What happens instead: after upgrade to 9.4.4, the cursor rests at
> column 2, under the a.
> How do I change the behavior back to the 9.3.6 one?

Short answer: disable electric-indent-local-mode, as suggested in
ORG-NEWS.  This will turn RET into the "dumb newline" key which should
never indent, and set C-j as the "smart newline" key which occasionally

> Facts about it:
> - When I start emacs with 'emacs -Q -nw' the bug does not manifest
>   even in 9.4.4.

That's surprising; on my setups, with Org 9.4.4, emacs -Q -nw stays at
column 2 after hitting RET.

> - I tried setting org-adapt-indentation to 't (the default) as it is
>   an obvious suspect, the bug still manifested.

org-adapt-indentation's determines how TAB and the "smart newline" key

- t (default): section bodies should be hard-indented,

- nil (to become the default for Org 9.5): nothing should be indented,

- 'headline-data: drawers (e.g. :LOGBOOK: entries and :PROPERTY: blocks)
  should be hard-indented, but not regular section text.

With all settings, "- a<smart newline>" indents at column 2, below "a".
As explained above, depending on electric-indent, the <smart newline>
key is either RET or C-j.

Note also that "- a<smart newline><smart newline><smart newline>" goes
back to column 0.  (FWIW I think that's a bit unwieldy; going back to
column 0 on the /second/ <smart newline> would make more sense to me, as
it would correspond to a "paragraph break")

  reply	other threads:[~2021-05-09 21:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09 21:17 Bug: spurious change in list indent cursor motion [9.4.4 (9.4.4-dist @ /home/powellj/elisp/org-9.4.4/lisp/)] James Powell
2021-05-09 21:58 ` Kévin Le Gouguec [this message]
2021-05-10  9:51   ` Nicolas Goaziou
2021-05-10 11:25     ` Kévin Le Gouguec
2021-05-10 12:36       ` Greg Minshall
2021-05-10 13:08         ` Kévin Le Gouguec
2021-05-10 14:50           ` Greg Minshall

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:

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87sg2vzhzy.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=powellj@pdx.edu \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).