Also, it moves you to an outer level if you are at an end.
For my own use, because I want the command to treat the first item in a
list the same way as the others (when moving forward), I tweaked
org-forward-element from
(let* ((elem (org-element-at-point))
to:
(let* ((elem (progn
(when (equal (car (org-element-at-point))
'plain-list)
(forward-char))
(org-element-at-point)))
The "backward" version behaves exactly as I would like it to.
Peter
On Sun, Dec 25, 2022 at 12:19 AM Ihor Radchenko <[email protected]> wrote:
> Marcin Borkowski <[email protected]> writes:
>
> >> org-forward-element
> >> org-backward-element
> >>
> >> These two should be mentioned in the manual in section 2.3 "Motion"
> >
> > How are they different from `org-forward-heading-same-level` and
> > `org-backward-heading-same-level'? (Not irony etc., I'm genuinely
> > curious.)
>
> They work on paragraphs, lists, blocks, etc.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>