emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: spurious change in list indent cursor motion [9.4.4 (9.4.4-dist


From: Kévin Le Gouguec
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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
indents.

> 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
behave:

- 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 via email to

[Prev in Thread] Current Thread [Next in Thread]