Hi, Is there a binding or functionality to go from this, (where | is the cursor position): - Cogito, |ergo sum. To this: - Cogito, |ergo sum. Pressing enter + tab (calls ~indent-for-tab-command~) doesn't work : the line is indented to the dash instead. Although ~indent-for-tab-command~ does indent correctly when called in an empty line after a list item. In the case of nested list, a way to cycle the indentation to that of the main or inside list would also be nice.
Hello, Sébastien Miquel <sebastien.miquel@posteo.eu> writes: > Is there a binding or functionality to go from this, (where | is the > cursor position): > > - Cogito, |ergo sum. > > To this: > > - Cogito, > |ergo sum. There is RET or C-j, depending on your settings. > In the case of nested list, a way to cycle the indentation to that of > the main or inside list would also be nice. I'm not sure what you mean here. Regards, -- Nicolas Goaziou
> There is RET or C-j, depending on your settings. C-j (~org-return-indent~) does work, thank you. > I'm not sure what you mean here. > > Regards, I meant to go from - Cogito, - ergo sum to - Cogito, - ergo sum But I don't really care about that use case anyway. > Hello, > > Sébastien Miquel <sebastien.miquel@posteo.eu> writes: > >> Is there a binding or functionality to go from this, (where | is the >> cursor position): >> >> - Cogito, |ergo sum. >> >> To this: >> >> - Cogito, >> |ergo sum. > There is RET or C-j, depending on your settings. > >> In the case of nested list, a way to cycle the indentation to that of >> the main or inside list would also be nice. > I'm not sure what you mean here. > > Regards,
Sébastien Miquel <sebastien.miquel@posteo.eu> writes:
>> There is RET or C-j, depending on your settings.
>
> C-j (~org-return-indent~) does work, thank you.
Just a heads-up: the next version of org-mode (9.4) will obey
electric-indent-mode, which is a global minor mode that is turned on by
default.
When this mode is enabled, RET means "smart return", i.e. "newline &
indent", while C-j means "just newline". This is how things work in
most modes (except Org) since Emacs 24.4.
When org-mode 9.4 is released, you can either use RET instead of C-j, or
disable electric-indent-mode in org-mode-hook, as will be explained in
ORG-NEWS.
Sébastien Miquel <sebastien.miquel@posteo.eu> writes:
> I meant to go from
>
> - Cogito,
> - ergo
> sum
>
> to
>
> - Cogito,
> - ergo
> sum
Structurally, this is weird. You are splitting a paragraph in two parts,
and sending the latter one into another item.
I think you can use regular Emacs commands, e.g., M-m M-SPC TAB.