From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SHkKDAWjsmN2OAEAbAwnHQ (envelope-from ) for ; Mon, 02 Jan 2023 10:25:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OHwDDAWjsmMaFgEA9RJhRA (envelope-from ) for ; Mon, 02 Jan 2023 10:25:25 +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 DDBA31F35 for ; Mon, 2 Jan 2023 10:25:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCH3d-0001Bd-DX; Mon, 02 Jan 2023 04:24:37 -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 1pCH3b-0001BG-Eu for emacs-orgmode@gnu.org; Mon, 02 Jan 2023 04:24:35 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCH3V-0005Ck-Js for emacs-orgmode@gnu.org; Mon, 02 Jan 2023 04:24:35 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 722202402A0 for ; Mon, 2 Jan 2023 10:24:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672651466; bh=WV6KvXlbgjdYjxLqP00NKJqBB3ogcIJnVdUaRjAiKqI=; h=From:To:Cc:Subject:Date:From; b=o8FF4yVdnq/QeOUb716jAHg4W+w+0Nd2zJ0Dhtj+jhzEx2jymbqzh9BB8p8YMEA2f ksF8ikh5gjMy/5I6GGJXVEmLHDMw7osM6e+albfpbL0eBKUzfSbs2/u8P4yJJGYpry P0Q5aBwFLuFERg6HZRTBJ2ey26Mra2CnTtq27lvD2odqeQ6clNgheAtjtAIYEkmChk 3pi4Ruu7zTxCr3CJFByzF8xqJoBnPNrux4iNrmCQ9m1xLPfWCLON7skapgRrWo+EdS OGBTQQi4FYuV/2hKOi/saHdlJ0Y8qiQZobfpnTUIJ/9cgrlhFKSaKB63j7Ku6qGQtb m8/VACNaAaOqg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Nlr6G14PGz9rxN; Mon, 2 Jan 2023 10:24:22 +0100 (CET) From: Ihor Radchenko To: alain.cochard@unistra.fr Cc: emacs-orgmode@gnu.org Subject: Re: org-up-element does not the same for all structural blocks In-Reply-To: <25522.5360.861501.370084@gargle.gargle.HOWL> References: <25522.5360.861501.370084@gargle.gargle.HOWL> Date: Mon, 02 Jan 2023 09:24:52 +0000 Message-ID: <87mt71mgpn.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, 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=1672651524; a=rsa-sha256; cv=none; b=Hnz1xAyg+9Aeu4BadGBAIu5ii78eHOo/+jOgxMJDL1+I510f73JHp4leb6jZdAkAF+95xf g1ob8chZTyPJmKpUoDDekkPBlC3OFe2I6b2EgADMvJDaWqX3vhsOUF8ZE+r60c+htowdfd GG1x4TgMZTaV8p7KX5DmdZcp2HVGIrkZlcnBRgvfisAx5+IRcjc2krZsRcGwn8MMS2Ac5N FSkyUhlTUXbhqPSYvTnHnFvRUIsvO/2SMxHzeMqB7PbnpGQ8G34267tMJ6/FuZdqCiO8cq ZvG6XMmM2FyYEHFYBpVWybLQLRBCpmLYPr4kPketsLzvLGBab7gvqGKUZiCWqA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=o8FF4yVd; 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=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672651524; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2aGVYpoz3h29NshdlvJwTHVCrNbDsrGtdwQBA9tZwD8=; b=RbfwcPZqb5d0jNuvqhqOS022b7n8uoiVPv/Jx+f7HOX1fmEmu5175G/5QNauV631d2TFCw SQCx8yhYfWrrtMLxt1Fr/IRNPvfN3PrY2mI8FIH6XoR6TqzvPHVLrGko4dM/Pwtz+UwKOR /MiwO0v8+tzKcJvAKTb6q9IePvFk5fMOlZ1ZnKyMytcdYpjMdwyMy+SBEb/Ys4l4fp7ImK ViY63jd1vh70ML1RUrwtB+aKo3USuqSdUpN1an6K8+zQyfehouLERjQmtp9plWn4pd9J/J ZjUCykZ+WsgwbJ3rwltf+dfKzwMZaQfwrxlyuU2seQYIfhSr7M8K1xMgeK9GVA== X-Spam-Score: -8.09 X-Migadu-Queue-Id: DDBA31F35 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=o8FF4yVd; 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=posteo.net X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -8.09 X-TUID: uCTOESZ3fxPE Alain.Cochard@unistra.fr writes: > With an org file like > > * h > #+begin_export ascii > foo > #+end_export > > putting the cursor on 'foo' and doing > > M-x org-up-element > > brings the cursor on '* h'. Same with the following blocks: > > =E2=80=98#+begin_comment=E2=80=99 ... =E2=80=98#+end_comment=E2=80=99 > =E2=80=98#+begin_example=E2=80=99 ... =E2=80=98#+end_example=E2=80=99 > =E2=80=98#+begin_export=E2=80=99 ... =E2=80=98#+end_export=E2=80=99 > =E2=80=98#+begin_export html=E2=80=99 ... =E2=80=98#+end_export=E2=80=99 > =E2=80=98#+begin_export latex=E2=80=99 ... =E2=80=98#+end_export=E2=80=99 > =E2=80=98#+begin_src=E2=80=99 ... =E2=80=98#+end_src=E2=80=99 (I tried or= g and lisp) > =E2=80=98#+begin_verse=E2=80=99 ... =E2=80=98#+end_verse=E2=80=99 > > But for those two blocks: > > =E2=80=98#+begin_center=E2=80=99 ... =E2=80=98#+end_center=E2=80=99 > =E2=80=98#+begin_quote=E2=80=99 ... =E2=80=98#+end_quote=E2=80=99 > > the cursor is moved to the beginning of the block instead, which I > find strange. This is to be expected. Center blocks, Quote blocks, and special blocks are "greater elements", which can directly contain other Org elements inside. Thus, #+begin_center Text #+end_center is interpreted as (center-block (paragraph)) So, `org-up-element' with point at paragraph will move to parent center-block. In contrast, comment/example/export/src/verse are "lesser blocks", which cannot contain other Org elements inside - their contents is taken verbatim: #+begin_comment Text #+end_comment is interpreted as (comment-block) with point at "Text", current element is comment-block, and its parent is headline in your example. > Incidentally, is there a definition understandable for the basic user > of what an "org element" is? I could not find one after a (quick) > Internet search, not even in https://orgmode.org/worg/org-syntax.html#orgb8e0d51 Also, see https://orgmode.org/worg/org-syntax.html#Greater_Elements --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at