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 ms9.migadu.com with LMTPS id qA14GOb+n2RyEgEASxT56A (envelope-from ) for ; Sat, 01 Jul 2023 12:24:38 +0200 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 cBaFF+b+n2QWCQAAG6o9tA (envelope-from ) for ; Sat, 01 Jul 2023 12:24:38 +0200 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 E6F7E1B5DA for ; Sat, 1 Jul 2023 12:24:37 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="JVe/vjhL"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688207077; a=rsa-sha256; cv=none; b=GNhqMN+PkMRej2bB8+d1jjkbDLEMm3zLuLNbPxhFxSoVZevFG+9YnOHVEcLVFWUuT6Lsah dDbwuFA8VJUKd/aZE/XHnGxhvf3DMOskuC/cJckGERFekTajgt2nHvF7Sumo5jl+VHYL6V 8Lv+XaSJKOsGQUgRHRaoZkV2X5x8m0L8rQqXgX6HJUusZr8W/e8kcwTD0HmWd3J6h6C+Yc R3CjNgQDGxb3peeyZWcjvqV2Vp7VI7c3MsS+6v3h7l7AlO/+iIYlLqQ8YZq/tpTvDAdHnP rt+qchJYJUGTPzk11t0MnEacPgNBWDK+LI6E8FMutz8tYI7eyIDFVCctVygKFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="JVe/vjhL"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688207077; 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=Q42xA30qLIXetGSB0oqZkFovuQhoepBXC9NcpPq2oPI=; b=Q7iVehf/srDWAS0YVJ9AJdYtp2M/6dv+JGWNRb5AIwSS2lbyo4A83iUKhq6+FWIg9JSGK7 AegaVqQF99ttW9qoabRlFJm5Jx3V1cE+W0a/yx+B3SE9ami9ZXhTBFqzobHNnvLB70EQIy aPjFUmayjJv6WGEhLvBunGWc8pt4dmyWbbPTxQPjoME/stMg+WyncIB3kDQx1ablw1TeQ1 U+VAMHr6sIcd2b709hwfnBfhb8cWLPrr/2c+qeuPIwsKhU6K6Zek4SXLH4b7E+WBNwid1E YEi5CpK8L1kNmnO+VOnjdQ9bF0sRrgtsUeSHzK0l0YyEyT1cSH1Xjlpf80pRRw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFXle-0000rV-Ki; Sat, 01 Jul 2023 06:23:50 -0400 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 1qFXld-0000rJ-IZ for emacs-orgmode@gnu.org; Sat, 01 Jul 2023 06:23:49 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFXlb-0003lv-Cb for emacs-orgmode@gnu.org; Sat, 01 Jul 2023 06:23:49 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 671CC240029 for ; Sat, 1 Jul 2023 12:23:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1688207025; bh=GP7d3/Rb+Q6yC7x1vvi6M/NrUDrrUf30B1t4/Yidq5g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=JVe/vjhLf97HLfIMUXv1E9iVRZM+trUgIiOczca1x6oosV1+M52mKBG6oZ6QkyyLK Z/XgfPwezIOuLk5xFd9+MGcgBPbLx96qOaHukahrEPSsdGnIvsYrUZ9XHTOih4s3sB mjZV00JoIP3JkzvqyJR2oarHUf9AcE8Mp4t5TpEwCES8csW0VGXSqalNmkh/xy33uK 6dGvnACNLIF0fKW5WGBZewiI0K33addBDDto5jTCV5RoAUSB7/rTnopwIf3HnZv/qJ LONDOfSPgKmyM1NaK7bvVSN2pdFQqUZGaNsd52N9/lwfAmI5qcY/l53khpq82Q4ifm 1ugPa2gB0f7Kw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QtSvh6Wyhz6tvm; Sat, 1 Jul 2023 12:23:44 +0200 (CEST) From: Ihor Radchenko To: pva-outdoor@yandex.ru Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] incorrect org-mode dynamic blocks docs [9.5.4 (release_9.5.4-3-g6dc785 @ /usr/local/share/emacs/29.0.50/lisp/org/)] In-Reply-To: <87a5wij05o.fsf@yandex.ru> References: <87a5wij05o.fsf@yandex.ru> Date: Sat, 01 Jul 2023 10:23:43 +0000 Message-ID: <87cz1corps.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.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.73 X-Migadu-Queue-Id: E6F7E1B5DA X-Spam-Score: -4.73 X-TUID: Si3Yh3mEtRLC pva-outdoor@yandex.ru writes: > 1. It seems that dynamic blocks can't have inner headlines (the > org-dblock-write:xxx should not produce them). Otherwise the block will > be parsed incorrectly (not mentioned in docs for org-mode). That's Org markup. Headings have the top priority - any "*...* " starting at the beginning of line is a heading that ends at the next "*...* " or end of buffer. > Example: Create the following 1.org and export it to unicode text (press > C-c C-e t U). You will see "#+BEGIN: block2" as text. > > * Block2 >=20=20=20 > #+BEGIN: block2 > ** Section 1 > asdasdsad > #+END: There is no block in the above example. What you have is * Block2 #+BEGIN: block2
** Section 1 asdasdsad #+END:
We intentionally do not prohibit such scenario for dynamic block functions to keep flexibility. =20=20=20 > 2. Org-mode info file says: > > Dynamic blocks, like any other block, can be narrowed with > =E2=80=98org-narrow-to-block=E2=80=99. > > That would not work because of implementation of org-narrow-to-block: > > (defun org-narrow-to-block () > "Narrow buffer to the current block." > (interactive) > (let* ((case-fold-search t) > (blockp (org-between-regexps-p "^[ \t]*#\\+begin_.*" <---- > "^[ \t]*#\\+end_.*"))) > (if blockp > (narrow-to-region (car blockp) (cdr blockp)) > (user-error "Not in a block")))) Agree. Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3D85aa3c185 > There is also a minor bug in org-mode (sould I report it > in it's own mail?): > > If you press C-c C-, [RET] [RET] You'll get: > > #+begin_ > #+end_nil > > while one could expect either begin_nil or end_.=20 An error will be thrown now. Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3D64a0a624d --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at