From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8JdxFU+8qGNbcAEAbAwnHQ (envelope-from ) for ; Sun, 25 Dec 2022 22:10:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cE15FE+8qGO/AQAAG6o9tA (envelope-from ) for ; Sun, 25 Dec 2022 22:10:39 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 43C0A1859F for ; Sun, 25 Dec 2022 22:10:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9YFW-0002Gk-7R; Sun, 25 Dec 2022 16:09:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9YFU-0002GZ-GR for emacs-orgmode@gnu.org; Sun, 25 Dec 2022 16:09:36 -0500 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9YFS-0000KL-Kb for emacs-orgmode@gnu.org; Sun, 25 Dec 2022 16:09:36 -0500 Received: by mail-lj1-x22c.google.com with SMTP id f16so9957845ljc.8 for ; Sun, 25 Dec 2022 13:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YY3gNsAFSnNsAx0aXsaJfhVhJ3A8OifUfw+HlePbNUY=; b=I10zihneU6I7qGujKJNpXVWz0Zz82WvnoHIFVREDTc0b/fCdmno9Ivv1wCpt6SOK9V 2Q1ewNGMLlvhd9IcBcQJUNg/HYrOgL0x/KkMeqXi5NyrestmL6ZnvIpyL8LJTOG/ZlMy tvL7lhqrnhrrxtwjQ6CB98+NP2/KW8PxwH5QkTiH534i3ZPRrYfoikJut2MtVeqqnGuS 9XZemHa/0Ccq3jpZdnYDRveNwWOsmbWzvXrzmcezrf+ElMBOd9iLXnXXN1ok43z57cMd RSIh9xaH/mEt1Gt47nXl7FEgWdD/x8vqgurK0c0nv9jRQGTbI2awqzGsHBEhRf2mpoSz siRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YY3gNsAFSnNsAx0aXsaJfhVhJ3A8OifUfw+HlePbNUY=; b=bVi4N0B2dEC9vTu8FukDYJNqcF6T1cUbsUJ3yz+VPP+6PcFMcvrCTYkJMbbAoj2dm1 jm/RCoGYvSnCY3lRyFgXKFP3iDdAHGogsUjPjhIsbV30DeX7+vX/cZKgyIvQ91QHpUjF 7CF/8SKDTmdw2UtslB7f3KoeQy3svK9UNxkWSZBrsFrIMZt3Gh3AFBTmD8uyP0pxalV0 6p9O3naNNzzV2YAuWrbfFx4gWQMO2aK1uDKErU+BBzRoPpoW5sXPoUfofJCoD1BzrR6k ZnhON2QkVsd2C+gZSLf+iGkJFNswG+cdGiILIybyTPBaIG9oiwHhVxOuAHX90EQ1O+QJ KItQ== X-Gm-Message-State: AFqh2ko5ycEi3B6TwOC5xaLaiTH0nnLzZsR9LccVp5XTS0ebNpA650FU miZp9wM5irDftzseFwnOPMVuBul416h0TRvaNMk= X-Google-Smtp-Source: AMrXdXutcKdBvbOXwGV+1GB5S0qd5hlCOdg9X5LLs04db6V8Xrl89G7qOq2Bp4b/EDi2SFzFe/kDG/zyP/Gcx1YmQ7I= X-Received: by 2002:a2e:9856:0:b0:27a:34f1:2991 with SMTP id e22-20020a2e9856000000b0027a34f12991mr1019064ljj.401.1672002571961; Sun, 25 Dec 2022 13:09:31 -0800 (PST) MIME-Version: 1.0 References: <87lemvsy7y.fsf@mbork.pl> <87bknruc8t.fsf@localhost> In-Reply-To: <87bknruc8t.fsf@localhost> From: Peter Mao Date: Sun, 25 Dec 2022 13:09:20 -0800 Message-ID: Subject: Re: missing from the manual To: Ihor Radchenko Cc: Marcin Borkowski , emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="0000000000005d8bf405f0ad6fb3" Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=peter.mao@gmail.com; helo=mail-lj1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672002638; a=rsa-sha256; cv=none; b=ObxcGVqzfvcSNIYny+eW42iXCJDL9EbSKqAACQB/VX4fAV6zvpwEnsVBxrMrt98PEPrYpf qaC+qaeK7LQELBF9PBoD3QbmWFk+EPnUVbrk6AmoU/7gNWd78L9yFDcvwJ5f0gbxzI86tc W2rEFIJCFuV4aZdOt9/WXiFWEBPCVBAbLnNMbvMe5SV8TLjiTkXNy0hv+bQd3PrB1nDUrk EAOl53eor3SLuGRxnszBJStPHeXIJV/I8dT//rTSH4rpTBYBhmXKSjuRgnlalcFx6mWs2r gq34SPc91ya7s5uNqIAllhV2BZ4N2rYzxU6K7WlNDJDVXG0ZxB16fW0Ypmn5cQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=I10zihne; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672002638; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YY3gNsAFSnNsAx0aXsaJfhVhJ3A8OifUfw+HlePbNUY=; b=d1WxIZJ6HB/V8vimML/rgGUDKdOY3Ylbsa8oJkBSqoJ+c25ZwZkSC/C0iEwymhwkY5S5aX 8bzY1hwd+Pv4QrJp3Nz9CleJeEgHdoZTlv8zo65Kfvat6z16i31LxNgEEC1DM1hgpCKVvu NO0l/h5fa5aOpyJIYApbg2dKWHL7D0xEjukuU58okwh9nMU3DKd39duCYUu+yzni7k9ik/ 9NshsJCjsAfhTS/jy/oW+5mqxPRl/uthQmEAU77CFFkMPJcMLEAWsVWVAIavwKxKubosPm Hrzr5Tu3tM6j5NomejWKPUbwymrZaxiY8xRHpd7LtNeCDxqzb3OdOfR4OUGvkg== X-Spam-Score: -7.38 X-Migadu-Queue-Id: 43C0A1859F Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=I10zihne; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -7.38 X-TUID: Y0gKkD/orqJ9 --0000000000005d8bf405f0ad6fb3 Content-Type: text/plain; charset="UTF-8" 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 wrote: > Marcin Borkowski 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 . > Support Org development at , > or support my work at > --0000000000005d8bf405f0ad6fb3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Also, it moves you to an outer level if you are at an= end.

For my own use, because I want the command t= o treat the first item in a list the same way as the others (when moving fo= rward), I tweaked org-forward-element from
(let* ((ele= m (org-element-at-point))

to:
=
(let* ((elem (progn
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (equal (car (org-element-at-po= int)) 'plain-list)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (forward-char))
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-= element-at-point)))

The "backward" versi= on 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 "M= otion"
>
> How are they different from `org-forward-heading-same-level` and
> `org-backward-heading-same-level'?=C2=A0 (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>
--0000000000005d8bf405f0ad6fb3--