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 OOavHRz4mmP6SwAAbAwnHQ (envelope-from ) for ; Thu, 15 Dec 2022 11:34:04 +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 cKexHRz4mmMFHwEA9RJhRA (envelope-from ) for ; Thu, 15 Dec 2022 11:34:04 +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 B978DEBE for ; Thu, 15 Dec 2022 11:34:03 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5lY9-00033c-Ko; Thu, 15 Dec 2022 05:33:13 -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 1p5lXq-00032b-3u for emacs-orgmode@gnu.org; Thu, 15 Dec 2022 05:32:54 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5lXi-0008W1-Fa for emacs-orgmode@gnu.org; Thu, 15 Dec 2022 05:32:53 -0500 Received: by mail-pj1-x102d.google.com with SMTP id e7-20020a17090a77c700b00216928a3917so2271903pjs.4 for ; Thu, 15 Dec 2022 02:32:43 -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=w+lhlOX31EFxkqjVvxiVo7ohNCIJKGlYsyaZz4b1uHc=; b=jBdD47zkg94yEyU0yZUvMQLT4o+KKOyWDm4x791yMKsad9CJRPNYrBzwCX+YOPOWQR xD2Y1TtW9XeR0iFwUqpXOARLVBNLTwKbeZ1OjY3hgkXvGXNTy1loqRIpE5Wjt2gMRw89 +6ryR9GYv1ZYGbru6pwKQ6GDAPPCEhy0pFmZKxisfIysxNymdO+OaQTo5NWzxORnbmy/ xxsr83FKJIw1OKfNbgFw9ZsH27EdtIy2j18iE3s002x+bX2/kg8lPu3ARkGEt9Z1dZIw 6vhEjQXqt2yXvyL0xD6uVMDPmCuyIj0S38tIS9pH7vTvoLGZTG6X1b2HGQx55u6eqMC+ q2Qw== 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=w+lhlOX31EFxkqjVvxiVo7ohNCIJKGlYsyaZz4b1uHc=; b=j/zr5yiDx4oLRRjBSIW15p0v5eLpjybLKgETJJ5f86SG6ty5Uk/gO5b21g/DitJhoN yLonGLtgUXqv6Ea8rAiuUfESEhfmROepj2+qLxQL2DJAxOxKRz6UsSWXx6lMXj04eS51 Klvo1GRZoCLda2BX1VgplKiRoqq5Stl9qlC2MgQC19rXCWKoKUKawDgERIWkgbba9Gl7 BhEqkiu5uRy/Ia3gH1HJuUCgyN1cyJD2/lRQvpd3PXKD7fBJoHefYwls+jkgy7n9HkCB kNW11hP28BgNo2VwbQd8fL6syfzgk5HR+E5Nfc6PD/WzwRKi6U9fxfNrcYntNHkmczhN kyDQ== X-Gm-Message-State: ANoB5plQiMxEpeKUTjFzWIk7A34l5jAJCaR3+K9AKDby2hONIaj2EauK CQfSAEGkRKGiGoaACwLGy5eo0XaCxBQYWgPs3jc= X-Google-Smtp-Source: AA0mqf5TCooKRnfBjRO9na7iD7JKBDeFRCx4I0zru3pTStZngn749G1cVWtH7VzNMeL+Z4amZzyq6buv/2wG41dmdyQ= X-Received: by 2002:a17:90b:4c11:b0:21a:1d94:568f with SMTP id na17-20020a17090b4c1100b0021a1d94568fmr647609pjb.51.1671100361851; Thu, 15 Dec 2022 02:32:41 -0800 (PST) MIME-Version: 1.0 References: <116c3126-32cc-44d0-9e95-e802161e1e84@app.fastmail.com> <87fsdhui6z.fsf@localhost> In-Reply-To: <87fsdhui6z.fsf@localhost> From: Kaushal Modi Date: Thu, 15 Dec 2022 05:32:30 -0500 Message-ID: Subject: Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language) To: Ihor Radchenko Cc: =?UTF-8?Q?Johan_Bolmsj=C3=B6?= , emacs-org list Content-Type: multipart/alternative; boundary="00000000000073cb5605efdb5ff1" Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=kaushal.modi@gmail.com; helo=mail-pj1-x102d.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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671100444; 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=w+lhlOX31EFxkqjVvxiVo7ohNCIJKGlYsyaZz4b1uHc=; b=kHw7hYnxcmk+1DeSolHD7u3x8VaMiHsUiBqtq6ixLxhgAMTGlqGCLvTZClXSlAh7EWu7Kf P4OlR6kqBrKWejqRfZysUKDmeq19ye0OSqfDnfyLgyY4EomXtONDF9ptPfn6qU0C2IwDw0 F5kbDGPEIg0kGC5dbbgSpu7Qwz6J0aEpizCtTjkbGPNO27DVzdwZH206XWieBbQSxIyINO IaCLHmyHGPyVlsVkf1O2oDhdpHTPMx9CZWV1SLm6NiEzVCaBW7FGmsxHGNjlKGg4GbB980 YaZIkPVFopvE0QY7rQI5GDg7dxmHfBFAvS5pBaXKUeP/l5I+2edupxSTdZ+pbw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jBdD47zk; dmarc=pass (policy=none) header.from=gmail.com; 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=1671100444; a=rsa-sha256; cv=none; b=mjHQ++KzOixH/VEr53gI9+a/OV8ynfO9cGL2gJwFDjOczZo/dmW/SUeEiqUeTgcSLlNM5M hCJcnOukMfcnBM7rU1q5R9lj8EQtHywWjfAZTgzAxG4IeFFE9ES0kuTGbkeVmebpOX92q6 pM0hNuMrBfH4lCVEVq/3huwiVRS+E26ZmCv4X4H+Gr6tsYxz6F79Ly54rJntiqGosV2oxH jMpBgj6AjKMJqR0zN9SLxV6yH7jAwH9r/l9BSuH1ez2e1llBnRXxFB2ffhIsl9UrGzKcsn XpsQRFw1rUqTNjlG4QnBKQFJFvI/88Kb4sOZan4cDBZi+t+pbjwRE8qrS0SUzw== X-Spam-Score: -5.97 X-Migadu-Queue-Id: B978DEBE X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jBdD47zk; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -5.97 X-TUID: VN1iAgbJUou+ --00000000000073cb5605efdb5ff1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 15, 2022, 4:32 AM Ihor Radchenko wrote: > Johan Bolmsj=C3=B6 writes: > > > #+caption: Caption 1 > > #+begin_src > > foo bar baz > > #+end_src > > There is an inconsistency here between Org parser and > https://orgmode.org/worg/org-syntax.html + manual. > > The actual parser does allow empty lang in src blocks, setting :lang > element property to nil. Should we stop doing this and treat such src > blocks as paragraphs? I think that this would cause more of a surprise to the user when something in a source block exports as a plain paragraph instead of in a
 block
(for HTML exports).

Or should we allow empty lang and instead adapt
> the exporters to treat empty lang correctly?
>

I vote for this one. Then

#+begin_src
foo
#+end_src

will be analogous to this in Markdown:

```
foo
```

--00000000000073cb5605efdb5ff1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, Dec 15, 2022, 4:32 AM Ihor Radchenko <yantar92@posteo.net> wrote:
Johan Bolmsj=C3=B6 <org-mode@johan.bi= tmaster.se> writes:

> #+caption: Caption 1
> #+begin_src
> foo bar baz
> #+end_src

There is an inconsistency here between Org parser and
https://orgmode.org/worg/org-syntax.html + ma= nual.

The actual parser does allow empty lang in src blocks, setting :lang
element property to nil.


Should we stop doing this and treat such sr= c
blocks as paragraphs?

=
I think that this would cause more of a surprise to the u= ser when something in a source block exports as a plain paragraph instead o= f in a <pre> block (for HTML exports).=C2=A0
<= br>
Or should we allow empty lang and instead adapt
the exporters to treat empty lang correctly?

I vote for this one. Then
=

#+begin_src
foo
#+end_src

will be analogous to this in Markdown:

```
foo
```


--00000000000073cb5605efdb5ff1--