From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp12.migadu.com ([2001:41d0:2:bcc0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms5.migadu.com with LMTPS
	id gMl4OKlUl2IUFAEAbAwnHQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 01 Jun 2022 13:59:38 +0200
Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp12.migadu.com with LMTPS
	id mGJKOKlUl2Jk/gAAauVa8A
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 01 Jun 2022 13:59:37 +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 7223B336A4
	for <larch@yhetil.org>; Wed,  1 Jun 2022 13:59:37 +0200 (CEST)
Received: from localhost ([::1]:38368 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	id 1nwN0h-0007rK-1E
	for larch@yhetil.org; Wed, 01 Jun 2022 07:59:35 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36348)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <manikulin@gmail.com>)
 id 1nwMqA-0004sP-PV
 for emacs-orgmode@gnu.org; Wed, 01 Jun 2022 07:48:42 -0400
Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:43805)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <manikulin@gmail.com>)
 id 1nwMq7-0005xf-W7
 for emacs-orgmode@gnu.org; Wed, 01 Jun 2022 07:48:42 -0400
Received: by mail-lf1-x131.google.com with SMTP id be31so2280847lfb.10
 for <emacs-orgmode@gnu.org>; Wed, 01 Jun 2022 04:48:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:message-id:date:mime-version:user-agent:subject
 :content-language:references:from:to:cc:in-reply-to
 :content-transfer-encoding;
 bh=GXaBndRmI0aOLpl5SONh1R/WRJ0GZwPx50zN1a7IuLA=;
 b=nkuQRZCmzTwJH9dLgcaHIFQDMjvhke5veEQMa5z6ygR/uDPwRt1IjOtInE6NgdIk3q
 uh8bnGLEGV3rbDC0Y1uGEygJqPsyg+nvIhc0t/Gw+GH+3WD4G1BnGrJif+EIzQt7e2I6
 kgNFtTST4Y4Wr97FdfBa0QfHxtzlq6XIX3SdSv3hx6z2ZsjYVQv1KY5mV9chxVpFEvi3
 f3gPW+oj+yBSjEUtf5eYJyFjX+Ia7/mHVSVxL/Y8HEZ48i0SKK62v9qIgyKayKkJvlVY
 1KiH+TpCtvmMhuxGD/A8jaPOvU2wsd4Pr5jr4/8lsP977dBf01EtZHPY03/m3IZziZVB
 7FpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:message-id:date:mime-version:user-agent
 :subject:content-language:references:from:to:cc:in-reply-to
 :content-transfer-encoding;
 bh=GXaBndRmI0aOLpl5SONh1R/WRJ0GZwPx50zN1a7IuLA=;
 b=uKfRAri/ELk07tfefWJ2UziEoeuCC7p3Fc32juhG/R0W4HWX5aDxz3rYXqHkzDpxQs
 v6odd6/SqK0v6jVyHnw2hkztJCgZKrp+w+iPKwNjDNmu1KdxUHv262w/pcN+5yRFmXIf
 0rusQQeHXUUC7xatAiqKMODkRQB53m7FJK6w92Vwu1uV1G4eK+EsuoR8Qh2xk33zAvrG
 3AlMiGv9U/TYpa6Lrpp00+T/npzOF7K/X6frw6WtMel9ifx3XxdpeH+yXWOK8nUD+lSq
 ypKlQC7t/5rThoMvbk8ew/7tZhrksXTvsAYdJ55Dc1tiMv5b5JHvF7flsIYTD5d+F+z9
 e6ig==
X-Gm-Message-State: AOAM5328nMDv6cH5zcl5CVLzwfZTFqm2OKVl0ftYzLnkpL44cakARFxL
 snsrSzKoH9+tf2YM9ac045MSSck0SP4uSM96
X-Google-Smtp-Source: ABdhPJwIiJEUNZBOLdb/Jz9+E01rTScZf3WQu4x/wYt8DINfrAQ3mdB7TtIb51SWwcWFFKz06ikZwg==
X-Received: by 2002:a05:6512:118a:b0:478:7e7f:5e85 with SMTP id
 g10-20020a056512118a00b004787e7f5e85mr32896854lfr.242.1654084117218; 
 Wed, 01 Jun 2022 04:48:37 -0700 (PDT)
Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188])
 by smtp.googlemail.com with ESMTPSA id
 y27-20020a0565123f1b00b0047255d211c4sm311718lfa.243.2022.06.01.04.48.36
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 01 Jun 2022 04:48:36 -0700 (PDT)
Message-ID: <18449694-8ad1-3f0c-d18a-3b6fd5369478@gmail.com>
Date: Wed, 1 Jun 2022 18:48:35 +0700
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.9.1
Subject: Re: [PATCH] ox: fix comment exported as a blank line
Content-Language: en-US
References: <87618398-cf6d-86b4-ba59-144f70d0f96e@7d.nz>
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Cc: Phil Estival <pe@7d.nz>
In-Reply-To: <87618398-cf6d-86b4-ba59-144f70d0f96e@7d.nz>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=2a00:1450:4864:20::131;
 envelope-from=manikulin@gmail.com; helo=mail-lf1-x131.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,
 NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: "Emacs-orgmode" <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
X-Migadu-Flow: FLOW_IN
X-Migadu-To: larch@yhetil.org
X-Migadu-Country: US
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1654084777;
	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=GXaBndRmI0aOLpl5SONh1R/WRJ0GZwPx50zN1a7IuLA=;
	b=QXSm8NdtauhdX2BegkSCHjzw7ISOaFNy00nAPGYcBz9/3dOeOhFAOoWa+pGxE6SG5DfOhc
	asAX5gl0PmBORv+3z+o6fDkIM4r9QbmzclvMfBUn65tRfMPNNtKlSmuaXcDT5957gQRA+z
	6tIgy2iil7+TC+nZpVB+Qn70uTR2RQfJus9emfjHPVKbvqXSz0r+GBMAYw9G/CrjES1WAg
	2M4GY4KlMD7B9196Qz3aWEE7RSqjtocq6RUVaK1umUr1Wl2Pt9cm00YXQi1RQBEy/9ctVI
	QA9CuAj6Y4ItQjM2qBukkdtcbf6g0Nv3RL9zyP/iuudnagX2s1ucn46ghsuF6w==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654084777; a=rsa-sha256; cv=none;
	b=qwzSt5A6VEMnxU3VURRUiWN9Ud5ohbcnIinx5V+rzDluRfGADDGMer9jEyGvf7FeMpg5t2
	5c8uN7Q+OKPbQJCSt0hnLTOnRT53SXyXTOYU9R9G9teEeDNXATVQBNcBB0fR4cclu6AGUl
	t0ztz198gn64JPUCHtBi1R/TjCTA8LpSgli+EKvl2Se5YDuZhXtj242hPpoBDSCFWfXmtR
	WaidXtqezRP8gaRSyILHRHh+W2Yz5JF9bcBv66mXWXfpZ25HENKClYVU2PN4S/xqq1v50K
	OaIVfIra3/lgn2Vt0B8nFg7pe85+3LDhutCv8Ri8epFMZrN2BcacLCGS8xuTqA==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=nkuQRZCm;
	dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none);
	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: 7.67
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=nkuQRZCm;
	dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none);
	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-Queue-Id: 7223B336A4
X-Spam-Score: 7.67
X-Migadu-Scanner: scn1.migadu.com
X-TUID: AL3PL1lKkLn0

On 01/06/2022 12:30, Phil Estival wrote:
> 
> * lisp/ox.el (org-export--skip-p): no longer export single-line
> comments as blank lines which did break paragraphs in two.

Phil, thank you for your attempt to improve handling of paragraph during 
export, there are enough various gotchas. Are the purpose of your patch 
the following?

#+begin_src elisp
   (org-export-string-as "Line 1.\n# comment\nLine 2." 'latex t)
#+end_src

#+RESULTS:
: Line 1.
: Line 2.

If so, unfortunately, you took a wrong direction, consider

#+begin_src elisp
   (org-export-string-as "Paragraph 1.\n# comment\nParagraph 2." 'html t)
#+end_src

#+RESULTS:
: <p>
: Paragraph 1.
: </p>
: <p>
: Paragraph 2.</p>

So there are still 2 separate paragraphs. It is necessary to either 
modify org-element parser or to apply a filter before passing AST to 
exporters. Last time it was discussed in

Ihor Radchenko. Merging paragraphs separated by comment lines during 
export (was: About 'inline special blocks') Thu, 26 May 2022 10:54:34 
+0800. https://list.orgmode.org/875ylt6m1h.fsf@localhost

Notice that accordingly to
https://orgmode.org/worg/dev/org-syntax.html
comment (that is "element") can not be a part of a paragraph. So current 
behavior is intentional. In your next patch fixing a test "Para1" and 
"Para2" are meaningful names assuming paragraphs. If behavior is changed 
"Line1" and "Line2" should be less confusing.

If you are interested in other cases when org paragraph is not the same 
as exported LaTeX one, see the following thread:

Max Nikulin. Comments break up a paragraph when writing 
one-setence-per-line. Sun, 3 Oct 2021 18:34:10 +0700. 
https://list.orgmode.org/sjc4fk$76r$1@ciao.gmane.io