From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6A5xGu+PHmVaAgEA9RJhRA:P1 (envelope-from ) for ; Thu, 05 Oct 2023 12:29:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6A5xGu+PHmVaAgEA9RJhRA (envelope-from ) for ; Thu, 05 Oct 2023 12:29:03 +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 9F4AC3A85D for ; Thu, 5 Oct 2023 12:29:02 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OL+0IWw+; 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=1696501743; 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=J5viRL0pR54TALgV0+UA+LPvqI+Il/rRiED0tuXC47E=; b=i/SAh6FFV1ccrVFVlt1E4RSiU9Az2LNo2qe7FL7HhKauKIGnO7lLAcX4Mq5Ovn+SEF7YPF akuONYGHoVgKzqKEdNLdx+650gitJXCGxbh2LuQ5CCMlmBMmqQdR45iW2kFTtW0e5gMV/3 BSAPZomv8sDUL457ru1bD0ABd1KISqSokVsIc5HLeU8oHONDlAG+COcZpVAKoC4lVQRaX0 13YY7yIcoJ7CNsN6evKmEOMf2IdXaryPqdDvhCfPXILNwIbqarxHduVxXKaKsmGMw9Wapi trEsp6iCkvlStv3K807ckSvbSvnMNg1GxU5bukZAwCg2Pb7DU0nPGM01TAsNNg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696501743; a=rsa-sha256; cv=none; b=fSUkz7zL7Ab78RzKOCSH1AolckTeaG7/+hgK8vY4U6NjUKm43wizrGnZfCoUmbW9A4Xban r/UTfjkUC1csJkJXohT/7V69rhKfKLO2jtc5PwbkXMw+VUvZsJJ8wroAVX7EVHs4Iu9Tpy DBxapQmncUFuuGOv4no3USvIKenBf0NnFpp74AsTqsw6Fcqv24kG+DHxtENXk6dDmwu/3j AkpEvUvEtMNFfRaMsUvVY63Lzge9LTiwWYTLkouvg4AaRd7Aj2b9o6NGT/8sZnc/kWLkkY 0QrCEC4p0IXCjMu7q9CKV4thB3rjxVb5poyP2PJclS6wnjJzSCSzd/22yPOquA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OL+0IWw+; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoLaT-0007uN-Kc; Thu, 05 Oct 2023 06:28:09 -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 1qoLaR-0007tw-P1 for emacs-orgmode@gnu.org; Thu, 05 Oct 2023 06:28:07 -0400 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 1qoLaP-0003aD-KE for emacs-orgmode@gnu.org; Thu, 05 Oct 2023 06:28:07 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A69F1240103 for ; Thu, 5 Oct 2023 12:28:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1696501683; bh=j93yEawe9Hx8elgdV62TAokLHDVU6mruvz3+U+BQ6iI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=OL+0IWw+wtYsytlicjhzsIfJHkmRpBB86A4ys2mQVJv4yxzAOQHQlGdalL945gt/C psyNnVusJW8F7svxxPrNADW455qmXovoJE+MSUZBjrJ8ZBn6JUIs/xL/ycBxdnVIWQ xoGKoTFpNNgj8rTo1p1KgX1syg5j30PeLhTyVhba02NDJ5fSHQNuV+CLmB4dxIjHrH 8GTqDZvbJR/28jOIpBUsYQd8YVUUKpAkLCKkuipjfAdly8zcyMd4mYI/7bem/LJu2+ de8AbvW+sFm/krkx6Woio8zVVIjNLGI9xgD+ooXnFVEY+949sCNL9j78Ji/bzOQozw kK2JRJUv+r7nA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S1SSL3ZBdz6twY; Thu, 5 Oct 2023 12:28:02 +0200 (CEST) From: Ihor Radchenko To: Tom Alexander Cc: emacs-orgmode@gnu.org Subject: Re: Lesser blocks allowing unescaped lines In-Reply-To: References: Date: Thu, 05 Oct 2023 10:29:38 +0000 Message-ID: <875y3ljral.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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_H5=0.001, RCVD_IN_MSPIKE_WL=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 X-Spam-Score: -8.79 X-Migadu-Spam-Score: -8.79 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Queue-Id: 9F4AC3A85D X-TUID: f6Q3+YkaHHs0 "Tom Alexander" writes: > This happens in worg at: https://git.sr.ht/~bzg/worg/tree/ba6cda890f200d428a5d68e819eef15b5306055f/exporters/ox-docstrings.org#L2490 > > The documentation for lesser blocks[1] states: >> Lines beginning with an asterisk or `#+` must be quoted by a comma (`,*`, `,#+`). > > However, the following test document parses as a lesser block despite containing a line starting with an unescaped #+: > ``` > #+CATEGORY: foo > #+begin_src text > #+CATEGORY: bar > #+end_src > ``` Escaping #+ lines is optional and mostly necessary to avoid confusing parser. For example, one would need to escape #+CATEGORY: foo #+begin_src text ,#+end_src #+end_src for obvious reasons. I have clarified the syntax document in https://git.sr.ht/~bzg/worg/commit/b1d16efc Hope the new examples explain better what is going on. > This test document shows that lines with an unescaped "*" do break up the lesser block: > ``` > * foo > #+begin_src text > * bar > #+end_src > ``` Unlike #+ lines, * is _always_ interpreted as a heading. So, it must always be escaped. The parser simply removes commas in all the ,* and ,#+ lines. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at