emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Peter Mao <peter.mao@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Marcin Borkowski <mbork@mbork.pl>, emacs-orgmode@gnu.org
Subject: Re: missing from the manual
Date: Sun, 25 Dec 2022 13:09:20 -0800	[thread overview]
Message-ID: <CAEK3s1PWG7QvKuCK_XejxjuvrJ9sS6ocTcmfwoykHA15rXcJsA@mail.gmail.com> (raw)
In-Reply-To: <87bknruc8t.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]

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 <yantar92@posteo.net> wrote:

> Marcin Borkowski <mbork@mbork.pl> 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>
>

[-- Attachment #2: Type: text/html, Size: 2135 bytes --]

  reply	other threads:[~2022-12-25 21:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-24  2:43 missing from the manual Peter Mao
2022-12-25  8:07 ` Marcin Borkowski
2022-12-25  8:19   ` Ihor Radchenko
2022-12-25 21:09     ` Peter Mao [this message]
2022-12-26 15:03 ` missing from the manual - move commands Max Nikulin
2022-12-27  1:35   ` Peter Mao
2023-01-25 13:42 ` [TODO] Document org-forward-element and org-backward-element in the manual (was: missing from the manual) Ihor Radchenko

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://www.orgmode.org/

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

  git send-email \
    --in-reply-to=CAEK3s1PWG7QvKuCK_XejxjuvrJ9sS6ocTcmfwoykHA15rXcJsA@mail.gmail.com \
    --to=peter.mao@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mbork@mbork.pl \
    --cc=yantar92@posteo.net \
    /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
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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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